mirror of
https://github.com/godotengine/godot.git
synced 2025-11-01 14:11:15 +00:00
Added multi-selection for sprite_frame_editor
use multi-selection for copy/paste move up or down frame duration set while multi-selected
This commit is contained in:
parent
a0d7649192
commit
8faba242a4
2 changed files with 218 additions and 105 deletions
|
|
@ -49,12 +49,15 @@
|
|||
class OptionButton;
|
||||
class EditorFileDialog;
|
||||
|
||||
class EditorSpriteFramesFrame : public Resource {
|
||||
GDCLASS(EditorSpriteFramesFrame, Resource);
|
||||
class ClipboardSpriteFrames : public Resource {
|
||||
GDCLASS(ClipboardSpriteFrames, Resource);
|
||||
|
||||
public:
|
||||
Ref<Texture2D> texture;
|
||||
float duration;
|
||||
struct Frame {
|
||||
Ref<Texture2D> texture;
|
||||
float duration;
|
||||
};
|
||||
Vector<Frame> frames;
|
||||
};
|
||||
|
||||
class SpriteFramesEditor : public HSplitContainer {
|
||||
|
|
@ -115,7 +118,7 @@ class SpriteFramesEditor : public HSplitContainer {
|
|||
SpinBox *frame_duration = nullptr;
|
||||
ItemList *frame_list = nullptr;
|
||||
bool loading_scene;
|
||||
int sel;
|
||||
Vector<int> selection;
|
||||
|
||||
Button *add_anim = nullptr;
|
||||
Button *delete_anim = nullptr;
|
||||
|
|
@ -182,6 +185,9 @@ class SpriteFramesEditor : public HSplitContainer {
|
|||
void _file_load_request(const Vector<String> &p_path, int p_at_pos = -1);
|
||||
void _copy_pressed();
|
||||
void _paste_pressed();
|
||||
void _paste_frame_array(const Ref<ClipboardSpriteFrames> &p_clipboard_frames);
|
||||
void _paste_texture(const Ref<Texture2D> &p_texture);
|
||||
|
||||
void _empty_pressed();
|
||||
void _empty2_pressed();
|
||||
void _delete_pressed();
|
||||
|
|
@ -209,7 +215,7 @@ class SpriteFramesEditor : public HSplitContainer {
|
|||
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 _frame_list_item_selected(int p_index, bool p_selected);
|
||||
|
||||
void _zoom_in();
|
||||
void _zoom_out();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue