EditorFileDialog.xml 5.1 KB

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