summaryrefslogtreecommitdiff
path: root/editor/animation_bezier_editor.h
diff options
context:
space:
mode:
Diffstat (limited to 'editor/animation_bezier_editor.h')
-rw-r--r--editor/animation_bezier_editor.h41
1 files changed, 20 insertions, 21 deletions
diff --git a/editor/animation_bezier_editor.h b/editor/animation_bezier_editor.h
index b082cae3ea..578c6f9337 100644
--- a/editor/animation_bezier_editor.h
+++ b/editor/animation_bezier_editor.h
@@ -51,11 +51,14 @@ class AnimationBezierTrackEdit : public Control {
HandleMode handle_mode;
OptionButton *handle_mode_option;
- AnimationTimelineEdit *timeline;
- UndoRedo *undo_redo;
- Node *root;
+ VBoxContainer *right_column;
+ Button *close_button;
+
+ AnimationTimelineEdit *timeline = nullptr;
+ UndoRedo *undo_redo = nullptr;
+ Node *root = nullptr;
Control *play_position; //separate control used to draw so updates for only position changed are much faster
- float play_position_pos;
+ float play_position_pos = 0;
Ref<Animation> animation;
int track;
@@ -70,37 +73,35 @@ class AnimationBezierTrackEdit : public Control {
Map<int, Rect2> subtracks;
- float v_scroll;
- float v_zoom;
+ float v_scroll = 0;
+ float v_zoom = 1;
- PopupMenu *menu;
+ PopupMenu *menu = nullptr;
void _zoom_changed();
- void _gui_input(const Ref<InputEvent> &p_event);
+ virtual void gui_input(const Ref<InputEvent> &p_event) override;
void _menu_selected(int p_index);
- bool *block_animation_update_ptr; //used to block all tracks re-gen (speed up)
-
void _play_position_draw();
Vector2 insert_at_pos;
- bool moving_selection_attempt;
- int select_single_attempt;
- bool moving_selection;
+ bool moving_selection_attempt = false;
+ int select_single_attempt = -1;
+ bool moving_selection = false;
int moving_selection_from_key;
Vector2 moving_selection_offset;
- bool box_selecting_attempt;
- bool box_selecting;
- bool box_selecting_add;
+ bool box_selecting_attempt = false;
+ bool box_selecting = false;
+ bool box_selecting_add = false;
Vector2 box_selection_from;
Vector2 box_selection_to;
- int moving_handle; //0 no move -1 or +1 out
- int moving_handle_key;
+ int moving_handle = 0; //0 no move -1 or +1 out
+ int moving_handle_key = 0;
Vector2 moving_handle_left;
Vector2 moving_handle_right;
@@ -129,7 +130,7 @@ class AnimationBezierTrackEdit : public Control {
Set<int> selection;
- bool panning_timeline;
+ bool panning_timeline = false;
float panning_timeline_from;
float panning_timeline_at;
@@ -155,8 +156,6 @@ public:
void set_editor(AnimationTrackEditor *p_editor);
void set_root(Node *p_root);
- void set_block_animation_update_ptr(bool *p_block_ptr);
-
void set_play_position(float p_pos);
void update_play_position();