You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-22 15:06:45 +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:
@@ -33,7 +33,7 @@
|
||||
|
||||
#include "scene/gui/dialogs.h"
|
||||
|
||||
class CheckBox;
|
||||
class DirectoryCreateDialog;
|
||||
class EditorFileSystemDirectory;
|
||||
class Tree;
|
||||
class TreeItem;
|
||||
@@ -41,25 +41,24 @@ class TreeItem;
|
||||
class EditorDirDialog : public ConfirmationDialog {
|
||||
GDCLASS(EditorDirDialog, ConfirmationDialog);
|
||||
|
||||
ConfirmationDialog *makedialog = nullptr;
|
||||
LineEdit *makedirname = nullptr;
|
||||
AcceptDialog *mkdirerr = nullptr;
|
||||
DirectoryCreateDialog *makedialog = nullptr;
|
||||
|
||||
Button *makedir = nullptr;
|
||||
Button *copy = nullptr;
|
||||
HashSet<String> opened_paths;
|
||||
String new_dir_path;
|
||||
|
||||
Tree *tree = nullptr;
|
||||
bool updating = false;
|
||||
CheckBox *copy = nullptr;
|
||||
|
||||
void _copy_toggled(bool p_pressed);
|
||||
void _item_collapsed(Object *p_item);
|
||||
void _item_activated();
|
||||
void _update_dir(TreeItem *p_item, EditorFileSystemDirectory *p_dir, const String &p_select_path = String());
|
||||
|
||||
void _make_dir();
|
||||
void _make_dir_confirm();
|
||||
void _make_dir_confirm(const String &p_path);
|
||||
|
||||
void _copy_pressed();
|
||||
void ok_pressed() override;
|
||||
|
||||
bool must_reload = false;
|
||||
@@ -69,8 +68,8 @@ protected:
|
||||
static void _bind_methods();
|
||||
|
||||
public:
|
||||
void config(const Vector<String> &p_paths);
|
||||
void reload(const String &p_path = "");
|
||||
bool is_copy_pressed() const;
|
||||
|
||||
EditorDirDialog();
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user