From a3b431b09d1d11b31feb40fed0785c85e753069c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gilles=20Roudi=C3=A8re?= Date: Thu, 19 Jan 2023 17:50:51 +0100 Subject: Add gesture to ViewPanner and simplify a bit its API --- editor/animation_track_editor.h | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) (limited to 'editor/animation_track_editor.h') diff --git a/editor/animation_track_editor.h b/editor/animation_track_editor.h index ef06445011..8506d9b80d 100644 --- a/editor/animation_track_editor.h +++ b/editor/animation_track_editor.h @@ -159,9 +159,8 @@ class AnimationTimelineEdit : public Range { bool use_fps = false; Ref panner; - void _scroll_callback(Vector2 p_scroll_vec, bool p_alt); - void _pan_callback(Vector2 p_scroll_vec); - void _zoom_callback(Vector2 p_scroll_vec, Vector2 p_origin, bool p_alt); + void _pan_callback(Vector2 p_scroll_vec, Ref p_event); + void _zoom_callback(float p_zoom_factor, Vector2 p_origin, Ref p_event); bool dragging_timeline = false; bool dragging_hsize = false; @@ -460,9 +459,8 @@ class AnimationTrackEditor : public VBoxContainer { PropertyInfo _find_hint_for_track(int p_idx, NodePath &r_base_path, Variant *r_current_val = nullptr); Ref panner; - void _scroll_callback(Vector2 p_scroll_vec, bool p_alt); - void _pan_callback(Vector2 p_scroll_vec); - void _zoom_callback(Vector2 p_scroll_vec, Vector2 p_origin, bool p_alt); + void _pan_callback(Vector2 p_scroll_vec, Ref p_event); + void _zoom_callback(float p_zoom_factor, Vector2 p_origin, Ref p_event); void _timeline_value_changed(double); -- cgit v1.2.3