summaryrefslogtreecommitdiff
path: root/editor/plugins/sprite_frames_editor_plugin.h
diff options
context:
space:
mode:
authorRémi Verschelde <rverschelde@gmail.com>2023-01-05 15:00:31 +0100
committerRémi Verschelde <rverschelde@gmail.com>2023-01-05 15:00:31 +0100
commit798582acf0610899792e71d9f186710245eff872 (patch)
treead64b67eceefc4640b25fe8decb47ee9e8ec9cdc /editor/plugins/sprite_frames_editor_plugin.h
parent1fb998775bd24348a4dbaef37fcab9274dd23ba9 (diff)
parent0d25d8e7fcb9db82e2017de3ca5281fcd28ddcf5 (diff)
Merge pull request #65609 from dalexeev/animated-sprite
`AnimatedSprite{2D,3D}` improvements
Diffstat (limited to 'editor/plugins/sprite_frames_editor_plugin.h')
-rw-r--r--editor/plugins/sprite_frames_editor_plugin.h18
1 files changed, 15 insertions, 3 deletions
diff --git a/editor/plugins/sprite_frames_editor_plugin.h b/editor/plugins/sprite_frames_editor_plugin.h
index 0b47ffa6c7..a5e0e54fb8 100644
--- a/editor/plugins/sprite_frames_editor_plugin.h
+++ b/editor/plugins/sprite_frames_editor_plugin.h
@@ -46,6 +46,14 @@
class EditorFileDialog;
+class EditorSpriteFramesFrame : public Resource {
+ GDCLASS(EditorSpriteFramesFrame, Resource);
+
+public:
+ Ref<Texture2D> texture;
+ float duration;
+};
+
class SpriteFramesEditor : public HSplitContainer {
GDCLASS(SpriteFramesEditor, HSplitContainer);
@@ -70,7 +78,8 @@ class SpriteFramesEditor : public HSplitContainer {
Button *zoom_out = nullptr;
Button *zoom_reset = nullptr;
Button *zoom_in = nullptr;
- ItemList *tree = nullptr;
+ SpinBox *frame_duration = nullptr;
+ ItemList *frame_list = nullptr;
bool loading_scene;
int sel;
@@ -134,6 +143,7 @@ class SpriteFramesEditor : public HSplitContainer {
void _delete_pressed();
void _up_pressed();
void _down_pressed();
+ void _frame_duration_changed(double p_value);
void _update_library(bool p_skip_selector = false);
void _animation_select();
@@ -143,9 +153,11 @@ class SpriteFramesEditor : public HSplitContainer {
void _animation_remove_confirmed();
void _animation_search_text_changed(const String &p_text);
void _animation_loop_changed();
- void _animation_fps_changed(double p_value);
+ void _animation_speed_changed(double p_value);
+
+ void _frame_list_gui_input(const Ref<InputEvent> &p_event);
+ void _frame_list_item_selected(int p_index);
- void _tree_input(const Ref<InputEvent> &p_event);
void _zoom_in();
void _zoom_out();
void _zoom_reset();