EditorFileDialog.xml 5.4 KB

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