add animation playback
This commit is contained in:
@@ -5,6 +5,7 @@
|
||||
#include "node_text.h"
|
||||
#include "node_checkbox.h"
|
||||
#include "node_button_custom.h"
|
||||
#include "node_combobox.h"
|
||||
|
||||
class NodeAnimationFrame : public NodeButtonCustom
|
||||
{
|
||||
@@ -43,6 +44,9 @@ public:
|
||||
|
||||
class NodePanelAnimation : public Node
|
||||
{
|
||||
NodeButtonCustom* btn_next = nullptr;
|
||||
NodeButtonCustom* btn_prev = nullptr;
|
||||
NodeButtonCustom* btn_play = nullptr;
|
||||
NodeButtonCustom* btn_add = nullptr;
|
||||
NodeButtonCustom* btn_remove = nullptr;
|
||||
NodeButtonCustom* btn_up = nullptr;
|
||||
@@ -52,8 +56,10 @@ class NodePanelAnimation : public Node
|
||||
Node* m_frames_container = nullptr;
|
||||
NodeAnimationFrame* m_selected_frame = nullptr;
|
||||
NodeAnimationTimeline* m_timeline = nullptr;
|
||||
NodeComboBox* m_fps = nullptr;
|
||||
int m_selected_frame_index = -1;
|
||||
uint32_t m_selected_frame_layer_id = 0;
|
||||
float m_playback_timer = 0;
|
||||
public:
|
||||
using this_class = NodePanelAnimation;
|
||||
using parent = Node;
|
||||
@@ -62,7 +68,8 @@ public:
|
||||
virtual void clone_finalize(Node* dest) const override;
|
||||
virtual void init() override;
|
||||
virtual void added(Node* parent) override;
|
||||
|
||||
virtual void on_tick(float dt) override;
|
||||
|
||||
void init_controls();
|
||||
void load_layers();
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user