EditorFileDialog.xml 5.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127
  1. <?xml version="1.0" encoding="UTF-8" ?>
  2. <class name="EditorFileDialog" inherits="ConfirmationDialog" version="3.2">
  3. <brief_description>
  4. A modified version of [FileDialog] used by the editor.
  5. </brief_description>
  6. <description>
  7. </description>
  8. <tutorials>
  9. </tutorials>
  10. <methods>
  11. <method name="add_filter">
  12. <return type="void">
  13. </return>
  14. <argument index="0" name="filter" type="String">
  15. </argument>
  16. <description>
  17. Adds a comma-delimited file extension filter option to the [EditorFileDialog] with an optional semi-colon-delimited label.
  18. For example, [code]"*.tscn, *.scn; Scenes"[/code] results in filter text "Scenes (*.tscn, *.scn)".
  19. </description>
  20. </method>
  21. <method name="clear_filters">
  22. <return type="void">
  23. </return>
  24. <description>
  25. Removes all filters except for "All Files (*)".
  26. </description>
  27. </method>
  28. <method name="get_vbox">
  29. <return type="VBoxContainer">
  30. </return>
  31. <description>
  32. Returns the [code]VBoxContainer[/code] used to display the file system.
  33. </description>
  34. </method>
  35. <method name="invalidate">
  36. <return type="void">
  37. </return>
  38. <description>
  39. Notify the [EditorFileDialog] that its view of the data is no longer accurate. Updates the view contents on next view update.
  40. </description>
  41. </method>
  42. </methods>
  43. <members>
  44. <member name="access" type="int" setter="set_access" getter="get_access" enum="EditorFileDialog.Access" default="0">
  45. The location from which the user may select a file, including [code]res://[/code], [code]user://[/code], and the local file system.
  46. </member>
  47. <member name="current_dir" type="String" setter="set_current_dir" getter="get_current_dir" default="&quot;res://&quot;">
  48. The currently occupied directory.
  49. </member>
  50. <member name="current_file" type="String" setter="set_current_file" getter="get_current_file" default="&quot;&quot;">
  51. The currently selected file.
  52. </member>
  53. <member name="current_path" type="String" setter="set_current_path" getter="get_current_path" default="&quot;res://&quot;">
  54. The file system path in the address bar.
  55. </member>
  56. <member name="dialog_hide_on_ok" type="bool" setter="set_hide_on_ok" getter="get_hide_on_ok" override="true" default="false" />
  57. <member name="disable_overwrite_warning" type="bool" setter="set_disable_overwrite_warning" getter="is_overwrite_warning_disabled" default="false">
  58. If [code]true[/code], the [EditorFileDialog] will not warn the user before overwriting files.
  59. </member>
  60. <member name="display_mode" type="int" setter="set_display_mode" getter="get_display_mode" enum="EditorFileDialog.DisplayMode" default="0">
  61. The view format in which the [EditorFileDialog] displays resources to the user.
  62. </member>
  63. <member name="mode" type="int" setter="set_mode" getter="get_mode" enum="EditorFileDialog.Mode" default="4">
  64. The purpose of the [EditorFileDialog], which defines the allowed behaviors.
  65. </member>
  66. <member name="resizable" type="bool" setter="set_resizable" getter="get_resizable" override="true" default="true" />
  67. <member name="show_hidden_files" type="bool" setter="set_show_hidden_files" getter="is_showing_hidden_files" default="false">
  68. If [code]true[/code], hidden files and directories will be visible in the [EditorFileDialog].
  69. </member>
  70. <member name="window_title" type="String" setter="set_title" getter="get_title" override="true" default="&quot;Save a File&quot;" />
  71. </members>
  72. <signals>
  73. <signal name="dir_selected">
  74. <argument index="0" name="dir" type="String">
  75. </argument>
  76. <description>
  77. Emitted when a directory is selected.
  78. </description>
  79. </signal>
  80. <signal name="file_selected">
  81. <argument index="0" name="path" type="String">
  82. </argument>
  83. <description>
  84. Emitted when a file is selected.
  85. </description>
  86. </signal>
  87. <signal name="files_selected">
  88. <argument index="0" name="paths" type="PoolStringArray">
  89. </argument>
  90. <description>
  91. Emitted when multiple files are selected.
  92. </description>
  93. </signal>
  94. </signals>
  95. <constants>
  96. <constant name="MODE_OPEN_FILE" value="0" enum="Mode">
  97. The [EditorFileDialog] can select only one file. Accepting the window will open the file.
  98. </constant>
  99. <constant name="MODE_OPEN_FILES" value="1" enum="Mode">
  100. The [EditorFileDialog] can select multiple files. Accepting the window will open all files.
  101. </constant>
  102. <constant name="MODE_OPEN_DIR" value="2" enum="Mode">
  103. The [EditorFileDialog] can select only one directory. Accepting the window will open the directory.
  104. </constant>
  105. <constant name="MODE_OPEN_ANY" value="3" enum="Mode">
  106. The [EditorFileDialog] can select a file or directory. Accepting the window will open it.
  107. </constant>
  108. <constant name="MODE_SAVE_FILE" value="4" enum="Mode">
  109. The [EditorFileDialog] can select only one file. Accepting the window will save the file.
  110. </constant>
  111. <constant name="ACCESS_RESOURCES" value="0" enum="Access">
  112. The [EditorFileDialog] can only view [code]res://[/code] directory contents.
  113. </constant>
  114. <constant name="ACCESS_USERDATA" value="1" enum="Access">
  115. The [EditorFileDialog] can only view [code]user://[/code] directory contents.
  116. </constant>
  117. <constant name="ACCESS_FILESYSTEM" value="2" enum="Access">
  118. The [EditorFileDialog] can view the entire local file system.
  119. </constant>
  120. <constant name="DISPLAY_THUMBNAILS" value="0" enum="DisplayMode">
  121. The [EditorFileDialog] displays resources as thumbnails.
  122. </constant>
  123. <constant name="DISPLAY_LIST" value="1" enum="DisplayMode">
  124. The [EditorFileDialog] displays resources as a list of filenames.
  125. </constant>
  126. </constants>
  127. </class>