diff options
| author | jagt | 2017-10-01 20:14:42 +0800 |
|---|---|---|
| committer | jagt | 2017-10-01 20:14:42 +0800 |
| commit | 86bcbd5b152e0df512512c14356ac9e694d148c2 (patch) | |
| tree | 0cf5879484844adf0a231bc54e90dfda5f705079 /scene/gui/graph_edit.cpp | |
| parent | 0c82d113edc4f7cc1bef11c2e03b2a1b39de90fb (diff) | |
| download | godot-86bcbd5b152e0df512512c14356ac9e694d148c2.tar.gz godot-86bcbd5b152e0df512512c14356ac9e694d148c2.tar.zst godot-86bcbd5b152e0df512512c14356ac9e694d148c2.zip | |
Diffstat (limited to 'scene/gui/graph_edit.cpp')
| -rw-r--r-- | scene/gui/graph_edit.cpp | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/scene/gui/graph_edit.cpp b/scene/gui/graph_edit.cpp index b0eb12fb6..0d3cccc2b 100644 --- a/scene/gui/graph_edit.cpp +++ b/scene/gui/graph_edit.cpp @@ -941,17 +941,17 @@ void GraphEdit::_gui_input(const Ref<InputEvent> &p_ev) { //too difficult to get right //set_zoom(zoom/ZOOM_SCALE); } - if (b->get_button_index() == BUTTON_WHEEL_UP) { - h_scroll->set_value(h_scroll->get_value() - h_scroll->get_page() * b->get_factor() / 8); - } - if (b->get_button_index() == BUTTON_WHEEL_DOWN) { - h_scroll->set_value(h_scroll->get_value() + h_scroll->get_page() * b->get_factor() / 8); + if (b->get_button_index() == BUTTON_WHEEL_UP && !Input::get_singleton()->is_key_pressed(KEY_SHIFT)) { + v_scroll->set_value(v_scroll->get_value() - v_scroll->get_page() * b->get_factor() / 8); } - if (b->get_button_index() == BUTTON_WHEEL_RIGHT) { + if (b->get_button_index() == BUTTON_WHEEL_DOWN && !Input::get_singleton()->is_key_pressed(KEY_SHIFT)) { v_scroll->set_value(v_scroll->get_value() + v_scroll->get_page() * b->get_factor() / 8); } - if (b->get_button_index() == BUTTON_WHEEL_LEFT) { - v_scroll->set_value(v_scroll->get_value() - v_scroll->get_page() * b->get_factor() / 8); + if (b->get_button_index() == BUTTON_WHEEL_RIGHT || (b->get_button_index() == BUTTON_WHEEL_DOWN && Input::get_singleton()->is_key_pressed(KEY_SHIFT))) { + h_scroll->set_value(h_scroll->get_value() + h_scroll->get_page() * b->get_factor() / 8); + } + if (b->get_button_index() == BUTTON_WHEEL_LEFT || (b->get_button_index() == BUTTON_WHEEL_UP && Input::get_singleton()->is_key_pressed(KEY_SHIFT))) { + h_scroll->set_value(h_scroll->get_value() - h_scroll->get_page() * b->get_factor() / 8); } } |
