aboutsummaryrefslogtreecommitdiff
path: root/editor/animation_editor.cpp
diff options
context:
space:
mode:
authorBernhard Liebl2017-11-01 21:49:39 +0100
committerBernhard Liebl2017-11-21 09:11:39 +0100
commit80ad8afc85a90e6fda1b136b13c1eb42e35c115e (patch)
treebc145bc5c008a2abfa159f4d5437c8d0b8813aca /editor/animation_editor.cpp
parent5ff84070ca3604b43e86562a3d000ed924a604a2 (diff)
downloadgodot-80ad8afc85a90e6fda1b136b13c1eb42e35c115e.tar.gz
godot-80ad8afc85a90e6fda1b136b13c1eb42e35c115e.tar.zst
godot-80ad8afc85a90e6fda1b136b13c1eb42e35c115e.zip
Diffstat (limited to 'editor/animation_editor.cpp')
-rw-r--r--editor/animation_editor.cpp12
1 files changed, 12 insertions, 0 deletions
diff --git a/editor/animation_editor.cpp b/editor/animation_editor.cpp
index 7d877bdb8..ae304ed0b 100644
--- a/editor/animation_editor.cpp
+++ b/editor/animation_editor.cpp
@@ -2889,6 +2889,18 @@ void AnimationKeyEditor::_track_editor_gui_input(const Ref<InputEvent> &p_input)
}
}
}
+
+ Ref<InputEventMagnifyGesture> magnify_gesture = p_input;
+ if (magnify_gesture.is_valid()) {
+ zoom->set_value(zoom->get_value() * magnify_gesture->get_factor());
+ }
+
+ Ref<InputEventPanGesture> pan_gesture = p_input;
+ if (pan_gesture.is_valid()) {
+
+ h_scroll->set_value(h_scroll->get_value() - h_scroll->get_page() * pan_gesture->get_delta().x / 8);
+ v_scroll->set_value(v_scroll->get_value() - v_scroll->get_page() * pan_gesture->get_delta().y / 8);
+ }
}
void AnimationKeyEditor::_notification(int p_what) {