diff options
author | RĂ©mi Verschelde <rverschelde@gmail.com> | 2019-05-24 19:56:15 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-05-24 19:56:15 +0200 |
commit | 71c784f796b87af0da239e70d1328677133c30e0 (patch) | |
tree | 0f0105ee7e2c8c63af3ca6c8caa62e6260b9dc07 /scene/gui/scroll_bar.cpp | |
parent | 11f20c43d7ec2c073feb06ec41739c6ace3d4044 (diff) | |
parent | 01491aaf3235475353c16cf0c664d0ed4a81a8c2 (diff) |
Merge pull request #29078 from KoBeWi/scroll_stuff
Improvements to scroll handling
Diffstat (limited to 'scene/gui/scroll_bar.cpp')
-rw-r--r-- | scene/gui/scroll_bar.cpp | 16 |
1 files changed, 3 insertions, 13 deletions
diff --git a/scene/gui/scroll_bar.cpp b/scene/gui/scroll_bar.cpp index 2938654ed9..686d1c96cc 100644 --- a/scene/gui/scroll_bar.cpp +++ b/scene/gui/scroll_bar.cpp @@ -53,29 +53,19 @@ void ScrollBar::_gui_input(Ref<InputEvent> p_event) { if (b.is_valid()) { accept_event(); - if (b->get_button_index() == 5 && b->is_pressed()) { + if (b->get_button_index() == BUTTON_WHEEL_DOWN && b->is_pressed()) { - /* - if (orientation==VERTICAL) - set_val( get_val() + get_page() / 4.0 ); - else - */ set_value(get_value() + get_page() / 4.0); accept_event(); } - if (b->get_button_index() == 4 && b->is_pressed()) { + if (b->get_button_index() == BUTTON_WHEEL_UP && b->is_pressed()) { - /* - if (orientation==HORIZONTAL) - set_val( get_val() - get_page() / 4.0 ); - else - */ set_value(get_value() - get_page() / 4.0); accept_event(); } - if (b->get_button_index() != 1) + if (b->get_button_index() != BUTTON_LEFT) return; if (b->is_pressed()) { |