summaryrefslogtreecommitdiffstats
path: root/editor/animation_track_editor.h
diff options
context:
space:
mode:
Diffstat (limited to 'editor/animation_track_editor.h')
-rw-r--r--editor/animation_track_editor.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/editor/animation_track_editor.h b/editor/animation_track_editor.h
index 4b9849b26c..b5242e2f67 100644
--- a/editor/animation_track_editor.h
+++ b/editor/animation_track_editor.h
@@ -131,6 +131,11 @@ protected:
class AnimationTimelineEdit : public Range {
GDCLASS(AnimationTimelineEdit, Range);
+ friend class AnimationBezierTrackEdit;
+ friend class AnimationTrackEditor;
+
+ static constexpr float SCROLL_ZOOM_FACTOR = 1.02f; // Zoom factor per mouse scroll in the animation editor. The closer to 1.0, the finer the control.
+
Ref<Animation> animation;
bool read_only = false;
@@ -167,6 +172,11 @@ class AnimationTimelineEdit : public Range {
bool dragging_hsize = false;
float dragging_hsize_from = 0.0f;
float dragging_hsize_at = 0.0f;
+ double last_zoom_scale = 1.0;
+ double hscroll_on_zoom_buffer = -1.0;
+
+ Vector2 zoom_scroll_origin;
+ bool zoom_callback_occured = false;
virtual void gui_input(const Ref<InputEvent> &p_event) override;
void _track_added(int p_track);
@@ -481,6 +491,8 @@ class AnimationTrackEditor : public VBoxContainer {
void _insert_key_from_track(float p_ofs, int p_track);
void _add_method_key(const String &p_method);
+ void _fetch_value_track_options(const NodePath &p_path, Animation::UpdateMode *r_update_mode, Animation::InterpolationType *r_interpolation_type, bool *r_loop_wrap);
+
void _clear_selection_for_anim(const Ref<Animation> &p_anim);
void _select_at_anim(const Ref<Animation> &p_anim, int p_track, float p_pos);