improve animation panel

This commit is contained in:
2019-10-19 22:30:44 +02:00
parent e25de3c454
commit 27576443ca
12 changed files with 120 additions and 25 deletions

View File

@@ -33,6 +33,7 @@ public:
int m_frames_count = 1;
int m_frame = 0;
int m_onion_size = 1;
glm::vec4 m_cursor_color = { 1, 0, 0, 1 };
virtual Node* clone_instantiate() const override { return new this_class; }
@@ -57,6 +58,8 @@ class NodePanelAnimation : public Node
NodeAnimationFrame* m_selected_frame = nullptr;
NodeAnimationTimeline* m_timeline = nullptr;
NodeComboBox* m_fps = nullptr;
NodeComboBox* m_onion = nullptr;
NodeText* m_frame_label = nullptr;
int m_selected_frame_index = -1;
uint32_t m_selected_frame_layer_id = 0;
float m_playback_timer = 0;
@@ -69,9 +72,12 @@ public:
virtual void init() override;
virtual void added(Node* parent) override;
virtual void on_tick(float dt) override;
virtual void handle_resize(glm::vec2 old_size, glm::vec2 new_size, float zoom) override;
void init_controls();
void load_layers();
void update_frames();
int get_onion_size() const noexcept { return m_onion->get_int(); }
};
//////////////////////////////////////////////////////////////////////////