diff --git a/doc/classes/EditorFileDialog.xml b/doc/classes/EditorFileDialog.xml index e893d92840c..4529a473c6c 100644 --- a/doc/classes/EditorFileDialog.xml +++ b/doc/classes/EditorFileDialog.xml @@ -15,12 +15,15 @@ + Adds a comma-delimited file extension filter option to the [code]EditorFileDialog[/code] with an optional semi-colon-delimited label. + Example: "*.tscn, *.scn; Scenes", results in filter text "Scenes (*.tscn, *.scn)". + Removes all filters except for "All Files (*)". @@ -63,12 +66,14 @@ + Returns the [code]VBoxContainer[/code] used to display the file system. + Notify the [code]EditorFileDialog[/code] that its view of the data is no longer accurate. Updates the view contents on next view update. @@ -148,46 +153,85 @@ + + + The location from which the user may select a file, including [code]res://[/code], [code]user://[/code], and the local file system. + + + The view format in which the [code]EditorFileDialog[/code] displays resources to the user. + + + The purpose of the [code]EditorFileDialog[/code]. Changes allowed behaviors. + + + The currently occupied directory. + + + The currently selected file. + + + The file system path in the address bar. + + + If [code]true[/code] hidden files and directories will be visible in the [code]EditorFileDialog[/code]. + + + If [code]true[/code] the [code]EditorFileDialog[/code] will not warn the user before overwriting files. + + + Emitted when a directory is selected. + Emitted when a file is selected. + Emitted when multiple files are selected. + The [code]EditorFileDialog[/code] can select only one file. Accepting the window will open the file. + The [code]EditorFileDialog[/code] can select multiple files. Accepting the window will open all files. + The [code]EditorFileDialog[/code] can select only one directory. Accepting the window will open the directory. + The [code]EditorFileDialog[/code] can select a file or directory. Accepting the window will open it. + The [code]EditorFileDialog[/code] can select only one file. Accepting the window will save the file. + The [code]EditorFileDialog[/code] can only view [code]res://[/code] directory contents. + The [code]EditorFileDialog[/code] can only view [code]user://[/code] directory contents. + The [code]EditorFileDialog[/code] can view the entire local file system. + The [code]EditorFileDialog[/code] displays resources as thumbnails. + The [code]EditorFileDialog[/code] displays resources as a list of filenames. diff --git a/editor/editor_file_dialog.cpp b/editor/editor_file_dialog.cpp index eb5af2eaeb1..6a5cbb88df7 100644 --- a/editor/editor_file_dialog.cpp +++ b/editor/editor_file_dialog.cpp @@ -1232,6 +1232,15 @@ void EditorFileDialog::_bind_methods() { ADD_SIGNAL(MethodInfo("files_selected", PropertyInfo(Variant::POOL_STRING_ARRAY, "paths"))); ADD_SIGNAL(MethodInfo("dir_selected", PropertyInfo(Variant::STRING, "dir"))); + ADD_PROPERTY(PropertyInfo(Variant::INT, "access", PROPERTY_HINT_ENUM, "Resources,User data,File system"), "set_access", "get_access"); + ADD_PROPERTY(PropertyInfo(Variant::INT, "display_mode", PROPERTY_HINT_ENUM, "Thumbnails,List"), "set_display_mode", "get_display_mode"); + ADD_PROPERTY(PropertyInfo(Variant::INT, "mode", PROPERTY_HINT_ENUM, "Open one,Open many,Open folder,Open any,Save"), "set_mode", "get_mode"); + ADD_PROPERTY(PropertyInfo(Variant::STRING, "current_dir", PROPERTY_HINT_DIR), "set_current_dir", "get_current_dir"); + ADD_PROPERTY(PropertyInfo(Variant::STRING, "current_file", PROPERTY_HINT_FILE, "*"), "set_current_file", "get_current_file"); + ADD_PROPERTY(PropertyInfo(Variant::STRING, "current_path"), "set_current_path", "get_current_path"); + ADD_PROPERTY(PropertyInfo(Variant::BOOL, "show_hidden_files"), "set_show_hidden_files", "is_showing_hidden_files"); + ADD_PROPERTY(PropertyInfo(Variant::BOOL, "disable_overwrite_warning"), "set_disable_overwrite_warning", "is_overwrite_warning_disabled"); + BIND_ENUM_CONSTANT(MODE_OPEN_FILE); BIND_ENUM_CONSTANT(MODE_OPEN_FILES); BIND_ENUM_CONSTANT(MODE_OPEN_DIR);