From df4faf8f334c5b1c71bfcec25fb64caf933b294b Mon Sep 17 00:00:00 2001 From: hondres Date: Thu, 4 Feb 2016 17:16:22 +0100 Subject: support horizontal mouse wheel, use in text editor --- scene/gui/text_edit.cpp | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'scene/gui') diff --git a/scene/gui/text_edit.cpp b/scene/gui/text_edit.cpp index 7f7c8c023c..bf012b7a03 100644 --- a/scene/gui/text_edit.cpp +++ b/scene/gui/text_edit.cpp @@ -1197,6 +1197,12 @@ void TextEdit::_input_event(const InputEvent& p_input_event) { if (mb.button_index==BUTTON_WHEEL_DOWN) { v_scroll->set_val( v_scroll->get_val() +3 ); } + if (mb.button_index==BUTTON_WHEEL_LEFT) { + h_scroll->set_val( h_scroll->get_val() -3 ); + } + if (mb.button_index==BUTTON_WHEEL_RIGHT) { + h_scroll->set_val( h_scroll->get_val() +3 ); + } if (mb.button_index==BUTTON_LEFT) { int row,col; -- cgit v1.2.3