diff options
author | hondres <liu.gam3@gmail.com> | 2016-02-04 17:16:22 +0100 |
---|---|---|
committer | hondres <liu.gam3@gmail.com> | 2016-02-04 17:16:22 +0100 |
commit | df4faf8f334c5b1c71bfcec25fb64caf933b294b (patch) | |
tree | b1444e53001ee0b7783525dc700d3466aa9b79e9 /scene/gui | |
parent | cefca4429c165134e1acc00bbd58bdcbc3f4f955 (diff) |
support horizontal mouse wheel, use in text editor
Diffstat (limited to 'scene/gui')
-rw-r--r-- | scene/gui/text_edit.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
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; |