2017-09-12 22:42:36 +02:00
<?xml version="1.0" encoding="UTF-8" ?>
2018-02-27 13:40:43 +01:00
<class name= "FileDialog" inherits= "ConfirmationDialog" category= "Core" version= "3.1" >
2017-09-12 22:42:36 +02:00
<brief_description >
Dialog for selecting files or directories in the filesystem.
</brief_description>
<description >
FileDialog is a preset dialog used to choose files and directories in the filesystem. It supports filter masks.
</description>
<tutorials >
</tutorials>
<demos >
</demos>
<methods >
<method name= "add_filter" >
<return type= "void" >
</return>
<argument index= "0" name= "filter" type= "String" >
</argument>
<description >
2018-10-11 19:28:36 +02:00
Add a custom filter. Example: [code]add_filter("*.png ; PNG Images")[/code]
2017-09-12 22:42:36 +02:00
</description>
</method>
<method name= "clear_filters" >
<return type= "void" >
</return>
<description >
Clear all the added filters in the dialog.
</description>
</method>
2017-11-27 23:37:47 +01:00
<method name= "deselect_items" >
<return type= "void" >
</return>
<description >
2018-10-11 19:28:36 +02:00
Clear currently selected items in the dialog.
2017-11-27 23:37:47 +01:00
</description>
</method>
2018-06-11 18:41:16 +02:00
<method name= "get_line_edit" >
<return type= "LineEdit" >
</return>
<description >
2018-10-11 19:28:36 +02:00
Returns the LineEdit for the selected file.
2018-06-11 18:41:16 +02:00
</description>
</method>
2017-09-12 22:42:36 +02:00
<method name= "get_vbox" >
<return type= "VBoxContainer" >
</return>
<description >
Return the vertical box container of the dialog, custom controls can be added to it.
</description>
</method>
<method name= "invalidate" >
<return type= "void" >
</return>
<description >
Invalidate and update the current dialog content list.
</description>
</method>
</methods>
<members >
2017-09-13 08:49:40 +02:00
<member name= "access" type= "int" setter= "set_access" getter= "get_access" enum= "FileDialog.Access" >
2018-10-11 19:28:36 +02:00
The file system access scope. See enum [code]Access[/code] constants.
2017-09-12 22:42:36 +02:00
</member>
2018-01-11 23:38:35 +01:00
<member name= "current_dir" type= "String" setter= "set_current_dir" getter= "get_current_dir" >
The current working directory of the file dialog.
</member>
<member name= "current_file" type= "String" setter= "set_current_file" getter= "get_current_file" >
The currently selected file of the file dialog.
</member>
<member name= "current_path" type= "String" setter= "set_current_path" getter= "get_current_path" >
The currently selected file path of the file dialog.
</member>
2017-09-13 08:49:40 +02:00
<member name= "filters" type= "PoolStringArray" setter= "set_filters" getter= "get_filters" >
2018-10-11 19:28:36 +02:00
Set file type filters. This example shows only .png and .gd files [code]set_filters(PoolStringArray(["*.png ; PNG Images","*.gd ; GD Script"]))[/code].
2017-09-12 22:42:36 +02:00
</member>
2017-09-13 08:49:40 +02:00
<member name= "mode" type= "int" setter= "set_mode" getter= "get_mode" enum= "FileDialog.Mode" >
2018-10-11 19:28:36 +02:00
Set dialog to open or save mode, changes selection behavior. See enum [code]Mode[/code] constants.
2017-09-12 22:42:36 +02:00
</member>
2017-12-03 02:54:06 +01:00
<member name= "mode_overrides_title" type= "bool" setter= "set_mode_overrides_title" getter= "is_mode_overriding_title" >
2018-12-19 17:20:49 +01:00
If [code]true[/code], changing the [code]Mode[/code] property will set the window title accordingly (e.g. setting mode to [code]MODE_OPEN_FILE[/code] will change the window title to "Open a File").
2017-12-03 02:54:06 +01:00
</member>
2017-09-13 08:49:40 +02:00
<member name= "show_hidden_files" type= "bool" setter= "set_show_hidden_files" getter= "is_showing_hidden_files" >
2018-10-11 19:28:36 +02:00
If [code]true[/code], the dialog will show hidden files.
2017-09-12 22:42:36 +02:00
</member>
</members>
<signals >
<signal name= "dir_selected" >
<argument index= "0" name= "dir" type= "String" >
</argument>
<description >
Event emitted when the user selects a directory.
</description>
</signal>
<signal name= "file_selected" >
<argument index= "0" name= "path" type= "String" >
</argument>
<description >
Event emitted when the user selects a file (double clicks it or presses the OK button).
</description>
</signal>
<signal name= "files_selected" >
<argument index= "0" name= "paths" type= "PoolStringArray" >
</argument>
<description >
Event emitted when the user selects multiple files.
</description>
</signal>
</signals>
<constants >
2017-11-24 23:16:30 +01:00
<constant name= "MODE_OPEN_FILE" value= "0" enum= "Mode" >
2017-09-12 22:42:36 +02:00
The dialog allows the selection of one, and only one file.
</constant>
2017-11-24 23:16:30 +01:00
<constant name= "MODE_OPEN_FILES" value= "1" enum= "Mode" >
2017-09-12 22:42:36 +02:00
The dialog allows the selection of multiple files.
</constant>
2017-11-24 23:16:30 +01:00
<constant name= "MODE_OPEN_DIR" value= "2" enum= "Mode" >
2017-09-12 22:42:36 +02:00
The dialog functions as a folder selector, disallowing the selection of any file.
</constant>
2017-11-24 23:16:30 +01:00
<constant name= "MODE_OPEN_ANY" value= "3" enum= "Mode" >
2017-09-12 22:42:36 +02:00
The dialog allows the selection of a file or a directory.
</constant>
2017-11-24 23:16:30 +01:00
<constant name= "MODE_SAVE_FILE" value= "4" enum= "Mode" >
2017-09-12 22:42:36 +02:00
The dialog will warn when a file exists.
</constant>
2017-11-24 23:16:30 +01:00
<constant name= "ACCESS_RESOURCES" value= "0" enum= "Access" >
2017-09-12 22:42:36 +02:00
The dialog allows the selection of file and directory.
</constant>
2017-11-24 23:16:30 +01:00
<constant name= "ACCESS_USERDATA" value= "1" enum= "Access" >
2017-10-14 12:45:26 +02:00
The dialog allows access files under [Resource] path(res://) .
2017-09-12 22:42:36 +02:00
</constant>
2017-11-24 23:16:30 +01:00
<constant name= "ACCESS_FILESYSTEM" value= "2" enum= "Access" >
2017-10-14 12:45:26 +02:00
The dialog allows access files in whole file system.
2017-09-12 22:42:36 +02:00
</constant>
</constants>
<theme_items >
<theme_item name= "files_disabled" type= "Color" >
</theme_item>
<theme_item name= "folder" type= "Texture" >
</theme_item>
2017-12-07 08:23:08 +01:00
<theme_item name= "parent_folder" type= "Texture" >
</theme_item>
2017-09-12 22:42:36 +02:00
<theme_item name= "reload" type= "Texture" >
</theme_item>
</theme_items>
</class>