You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-29 16:16:38 +00:00
Improve EditorDirDialog
* Automatically selects the newly created directory * Automatically selects "res://" when nothing is selected * Fixes an error when overwrite/replace dialog appears * Changes "copy checkbox + action button" to "copy button + move button" * Double clicking a directory (un)collapses it instead of copy/move * Uses DirectoryCreateDialog for "Create Folder"
This commit is contained in:
@@ -110,7 +110,7 @@ void DirectoryCreateDialog::ok_pressed() {
|
||||
err = da->make_dir_recursive(path);
|
||||
|
||||
if (err == OK) {
|
||||
emit_signal(SNAME("dir_created"));
|
||||
emit_signal(SNAME("dir_created"), base_dir.path_join(path));
|
||||
} else {
|
||||
EditorNode::get_singleton()->show_warning(TTR("Could not create folder."));
|
||||
}
|
||||
@@ -131,7 +131,7 @@ void DirectoryCreateDialog::config(const String &p_base_dir) {
|
||||
}
|
||||
|
||||
void DirectoryCreateDialog::_bind_methods() {
|
||||
ADD_SIGNAL(MethodInfo("dir_created"));
|
||||
ADD_SIGNAL(MethodInfo("dir_created", PropertyInfo(Variant::STRING, "path")));
|
||||
}
|
||||
|
||||
DirectoryCreateDialog::DirectoryCreateDialog() {
|
||||
|
||||
Reference in New Issue
Block a user