You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-10 13:00:37 +00:00
Create spritesheet for SpriteFrames by drag and dropping.
Close godotengine/godot-proposals#378
(cherry picked from commit 390ff22a8c)
This commit is contained in:
committed by
Rémi Verschelde
parent
c47ad12e80
commit
32a0a50fcf
@@ -31,6 +31,8 @@
|
|||||||
#include "sprite_frames_editor_plugin.h"
|
#include "sprite_frames_editor_plugin.h"
|
||||||
|
|
||||||
#include "core/io/resource_loader.h"
|
#include "core/io/resource_loader.h"
|
||||||
|
#include "core/os/input.h"
|
||||||
|
#include "core/os/keyboard.h"
|
||||||
#include "core/project_settings.h"
|
#include "core/project_settings.h"
|
||||||
#include "editor/editor_scale.h"
|
#include "editor/editor_scale.h"
|
||||||
#include "editor/editor_settings.h"
|
#include "editor/editor_settings.h"
|
||||||
@@ -861,9 +863,13 @@ void SpriteFramesEditor::drop_data_fw(const Point2 &p_point, const Variant &p_da
|
|||||||
|
|
||||||
PoolVector<String> files = d["files"];
|
PoolVector<String> files = d["files"];
|
||||||
|
|
||||||
|
if (Input::get_singleton()->is_key_pressed(KEY_CONTROL)) {
|
||||||
|
_prepare_sprite_sheet(files[0]);
|
||||||
|
} else {
|
||||||
_file_load_request(files, at_pos);
|
_file_load_request(files, at_pos);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void SpriteFramesEditor::_bind_methods() {
|
void SpriteFramesEditor::_bind_methods() {
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user