EditorFileDialog.xml 5.1 KB

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