summaryrefslogtreecommitdiffstats
path: root/editor/filesystem_dock.h
diff options
context:
space:
mode:
authorWiwip <lpafortier@gmail.com>2023-05-26 17:04:14 -0400
committerWiwip <lpafortier@gmail.com>2023-06-02 16:29:07 -0400
commit28038feb04b7b638e76a6c34bcbb02a706868b3e (patch)
tree9b3fefec25462b6def2a13292b78bb5cab3d04ef /editor/filesystem_dock.h
parent72f7131be1be81e3b8c3d45732d55e5765b95dde (diff)
downloadredot-engine-28038feb04b7b638e76a6c34bcbb02a706868b3e.tar.gz
Permits the renaming of files and folders inline for items in the FileSystemDock.
This is a continuation of: https://github.com/godotengine/godot/pull/76794 which didn't consider DISPLAY_MODE_SPLIT. Fixes: https://github.com/godotengine/godot/issues/77527 and https://github.com/godotengine/godot-proposals/issues/4933
Diffstat (limited to 'editor/filesystem_dock.h')
-rw-r--r--editor/filesystem_dock.h19
1 files changed, 18 insertions, 1 deletions
diff --git a/editor/filesystem_dock.h b/editor/filesystem_dock.h
index 480e0db84d..0af3193aa5 100644
--- a/editor/filesystem_dock.h
+++ b/editor/filesystem_dock.h
@@ -57,7 +57,24 @@ class FileSystemTree : public Tree {
};
class FileSystemList : public ItemList {
- virtual Control *make_custom_tooltip(const String &p_text) const;
+ GDCLASS(FileSystemList, ItemList);
+
+ VBoxContainer *popup_editor_vb = nullptr;
+ Popup *popup_editor = nullptr;
+ LineEdit *line_editor = nullptr;
+
+ virtual Control *make_custom_tooltip(const String &p_text) const override;
+ void _line_editor_submit(String p_text);
+ void _text_editor_popup_modal_close();
+
+protected:
+ static void _bind_methods();
+
+public:
+ bool edit_selected();
+ String get_edit_text();
+
+ FileSystemList();
};
class FileSystemDock : public VBoxContainer {