diff options
Diffstat (limited to 'editor/animation_track_editor.h')
-rw-r--r-- | editor/animation_track_editor.h | 19 |
1 files changed, 13 insertions, 6 deletions
diff --git a/editor/animation_track_editor.h b/editor/animation_track_editor.h index 5ebfd26322..2a2b20ada9 100644 --- a/editor/animation_track_editor.h +++ b/editor/animation_track_editor.h @@ -5,8 +5,8 @@ /* GODOT ENGINE */ /* https://godotengine.org */ /*************************************************************************/ -/* Copyright (c) 2007-2021 Juan Linietsky, Ariel Manzur. */ -/* Copyright (c) 2014-2021 Godot Engine contributors (cf. AUTHORS.md). */ +/* Copyright (c) 2007-2022 Juan Linietsky, Ariel Manzur. */ +/* Copyright (c) 2014-2022 Godot Engine contributors (cf. AUTHORS.md). */ /* */ /* Permission is hereby granted, free of charge, to any person obtaining */ /* a copy of this software and associated documentation files (the */ @@ -48,8 +48,8 @@ #include "scene_tree_editor.h" class AnimationPlayer; - class AnimationTrackEdit; +class ViewPanner; class AnimationTimelineEdit : public Range { GDCLASS(AnimationTimelineEdit, Range); @@ -81,9 +81,11 @@ class AnimationTimelineEdit : public Range { bool editing; bool use_fps; - bool panning_timeline; - float panning_timeline_from; - float panning_timeline_at; + Ref<ViewPanner> panner; + void _scroll_callback(Vector2 p_scroll_vec); + void _pan_callback(Vector2 p_scroll_vec); + void _zoom_callback(Vector2 p_scroll_vec, Vector2 p_origin); + bool dragging_timeline; bool dragging_hsize; float dragging_hsize_from; @@ -374,6 +376,11 @@ class AnimationTrackEditor : public VBoxContainer { PropertyInfo _find_hint_for_track(int p_idx, NodePath &r_base_path, Variant *r_current_val = nullptr); + Ref<ViewPanner> panner; + void _scroll_callback(Vector2 p_scroll_vec); + void _pan_callback(Vector2 p_scroll_vec); + void _zoom_callback(Vector2 p_scroll_vec, Vector2 p_origin); + void _timeline_value_changed(double); float insert_key_from_track_call_ofs; |