summaryrefslogtreecommitdiff
path: root/editor/animation_editor.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'editor/animation_editor.cpp')
-rw-r--r--editor/animation_editor.cpp18
1 files changed, 16 insertions, 2 deletions
diff --git a/editor/animation_editor.cpp b/editor/animation_editor.cpp
index 63ed27e60c..1e6562fcf2 100644
--- a/editor/animation_editor.cpp
+++ b/editor/animation_editor.cpp
@@ -1871,21 +1871,35 @@ void AnimationKeyEditor::_track_editor_gui_input(const InputEvent &p_input) {
if (mb.button_index == BUTTON_WHEEL_UP && mb.pressed) {
if (mb.mod.command) {
+
zoom->set_value(zoom->get_value() + zoom->get_step());
} else {
- v_scroll->set_value(v_scroll->get_value() - v_scroll->get_page() / 8);
+
+ v_scroll->set_value(v_scroll->get_value() - v_scroll->get_page() * mb.factor / 8);
}
}
if (mb.button_index == BUTTON_WHEEL_DOWN && mb.pressed) {
if (mb.mod.command) {
+
zoom->set_value(zoom->get_value() - zoom->get_step());
} else {
- v_scroll->set_value(v_scroll->get_value() + v_scroll->get_page() / 8);
+
+ v_scroll->set_value(v_scroll->get_value() + v_scroll->get_page() * mb.factor / 8);
}
}
+ if (mb.button_index == BUTTON_WHEEL_RIGHT && mb.pressed) {
+
+ h_scroll->set_value(h_scroll->get_value() - h_scroll->get_page() * mb.factor / 8);
+ }
+
+ if (mb.button_index == BUTTON_WHEEL_LEFT && mb.pressed) {
+
+ v_scroll->set_value(v_scroll->get_value() + v_scroll->get_page() * mb.factor / 8);
+ }
+
if (mb.button_index == BUTTON_RIGHT && mb.pressed) {
Point2 mpos = Point2(mb.x, mb.y) - ofs;