Merge pull request #35572 from dankan1890/drag_sheet
Create spritesheet for SpriteFrames by drag and dropping.
This commit is contained in:
commit
8a33107086
|
@ -32,6 +32,7 @@
|
|||
|
||||
#include "core/config/project_settings.h"
|
||||
#include "core/io/resource_loader.h"
|
||||
#include "core/os/keyboard.h"
|
||||
#include "editor/editor_scale.h"
|
||||
#include "editor/editor_settings.h"
|
||||
#include "scene/3d/sprite_3d.h"
|
||||
|
@ -952,7 +953,11 @@ void SpriteFramesEditor::drop_data_fw(const Point2 &p_point, const Variant &p_da
|
|||
if (String(d["type"]) == "files") {
|
||||
Vector<String> files = d["files"];
|
||||
|
||||
_file_load_request(files, at_pos);
|
||||
if (Input::get_singleton()->is_key_pressed(KEY_CONTROL)) {
|
||||
_prepare_sprite_sheet(files[0]);
|
||||
} else {
|
||||
_file_load_request(files, at_pos);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue