diff options
author | cespeute <espeut.clement@gmail.com> | 2022-05-10 22:25:36 +0200 |
---|---|---|
committer | Valden <espeut.clement@gmail.com> | 2022-11-14 22:46:27 +0100 |
commit | 4b00c2ec57317d71c8e1b217952715c1b6006648 (patch) | |
tree | c12059ead0a9ca190de69fbfd999bcdc479e405e /doc/classes | |
parent | 315c64282bb8d24963104c6386f0a82dc5ccb777 (diff) |
Add EditorInterface.get_selected_paths()
Exposes the selected paths in the editor filesystem dock.
Implements this proposal : https://github.com/godotengine/godot-proposals/issues/2424
Also renamed the old `get_selected_path` to `get_selected_directory` to
better match the already existing get_current_path function.
Diffstat (limited to 'doc/classes')
-rw-r--r-- | doc/classes/EditorInterface.xml | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/doc/classes/EditorInterface.xml b/doc/classes/EditorInterface.xml index bb319cb5a3..5d4b83bc27 100644 --- a/doc/classes/EditorInterface.xml +++ b/doc/classes/EditorInterface.xml @@ -48,6 +48,12 @@ [b]Warning:[/b] Removing and freeing this node will render a part of the editor useless and may cause a crash. </description> </method> + <method name="get_current_directory" qualifiers="const"> + <return type="String" /> + <description> + Returns the current directory being viewed in the [FileSystemDock]. If a file is selected, its base directory will be returned using [method String.get_base_dir] instead. + </description> + </method> <method name="get_current_path" qualifiers="const"> <return type="String" /> <description> @@ -131,10 +137,10 @@ [b]Warning:[/b] Removing and freeing this node will render a part of the editor useless and may cause a crash. </description> </method> - <method name="get_selected_path" qualifiers="const"> - <return type="String" /> + <method name="get_selected_paths" qualifiers="const"> + <return type="PackedStringArray" /> <description> - Returns the path of the directory currently selected in the [FileSystemDock]. If a file is selected, its base directory will be returned using [method String.get_base_dir] instead. + Returns an array containing the paths of the currently selected files (and directories) in the [FileSystemDock]. </description> </method> <method name="get_selection"> |