EditorSettings.xml 5.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184
  1. <?xml version="1.0" encoding="UTF-8" ?>
  2. <class name="EditorSettings" inherits="Resource" category="Core" version="3.1.2">
  3. <brief_description>
  4. Object that holds the project-independent editor settings.
  5. </brief_description>
  6. <description>
  7. Object that holds the project-independent editor settings. These settings are generally visible in the Editor Settings menu.
  8. Accessing the settings is done by using the regular [Object] API, such as:
  9. [codeblock]
  10. settings.set(prop,value)
  11. settings.get(prop)
  12. list_of_settings = settings.get_property_list()
  13. [/codeblock]
  14. </description>
  15. <tutorials>
  16. </tutorials>
  17. <methods>
  18. <method name="add_property_info">
  19. <return type="void">
  20. </return>
  21. <argument index="0" name="info" type="Dictionary">
  22. </argument>
  23. <description>
  24. Add a custom property info to a property. The dictionary must contain: name:[String](the name of the property) and type:[int](see TYPE_* in [@GlobalScope]), and optionally hint:[int](see PROPERTY_HINT_* in [@GlobalScope]), hint_string:[String].
  25. Example:
  26. [codeblock]
  27. editor_settings.set("category/property_name", 0)
  28. var property_info = {
  29. "name": "category/property_name",
  30. "type": TYPE_INT,
  31. "hint": PROPERTY_HINT_ENUM,
  32. "hint_string": "one,two,three"
  33. }
  34. editor_settings.add_property_info(property_info)
  35. [/codeblock]
  36. </description>
  37. </method>
  38. <method name="erase">
  39. <return type="void">
  40. </return>
  41. <argument index="0" name="property" type="String">
  42. </argument>
  43. <description>
  44. Erase a given setting (pass full property path).
  45. </description>
  46. </method>
  47. <method name="get_favorites" qualifiers="const">
  48. <return type="PoolStringArray">
  49. </return>
  50. <description>
  51. Get the list of favorite files and directories for this project.
  52. </description>
  53. </method>
  54. <method name="get_project_metadata" qualifiers="const">
  55. <return type="Variant">
  56. </return>
  57. <argument index="0" name="section" type="String">
  58. </argument>
  59. <argument index="1" name="key" type="String">
  60. </argument>
  61. <argument index="2" name="default" type="Variant" default="null">
  62. </argument>
  63. <description>
  64. </description>
  65. </method>
  66. <method name="get_project_settings_dir" qualifiers="const">
  67. <return type="String">
  68. </return>
  69. <description>
  70. Get the specific project settings path. Projects all have a unique sub-directory inside the settings path where project specific settings are saved.
  71. </description>
  72. </method>
  73. <method name="get_recent_dirs" qualifiers="const">
  74. <return type="PoolStringArray">
  75. </return>
  76. <description>
  77. Get the list of recently visited folders in the file dialog for this project.
  78. </description>
  79. </method>
  80. <method name="get_setting" qualifiers="const">
  81. <return type="Variant">
  82. </return>
  83. <argument index="0" name="name" type="String">
  84. </argument>
  85. <description>
  86. </description>
  87. </method>
  88. <method name="get_settings_dir" qualifiers="const">
  89. <return type="String">
  90. </return>
  91. <description>
  92. Get the global settings path for the engine. Inside this path you can find some standard paths such as:
  93. settings/tmp - used for temporary storage of files
  94. settings/templates - where export templates are located
  95. </description>
  96. </method>
  97. <method name="has_setting" qualifiers="const">
  98. <return type="bool">
  99. </return>
  100. <argument index="0" name="name" type="String">
  101. </argument>
  102. <description>
  103. </description>
  104. </method>
  105. <method name="property_can_revert">
  106. <return type="bool">
  107. </return>
  108. <argument index="0" name="name" type="String">
  109. </argument>
  110. <description>
  111. </description>
  112. </method>
  113. <method name="property_get_revert">
  114. <return type="Variant">
  115. </return>
  116. <argument index="0" name="name" type="String">
  117. </argument>
  118. <description>
  119. </description>
  120. </method>
  121. <method name="set_favorites">
  122. <return type="void">
  123. </return>
  124. <argument index="0" name="dirs" type="PoolStringArray">
  125. </argument>
  126. <description>
  127. Set the list of favorite files and directories for this project.
  128. </description>
  129. </method>
  130. <method name="set_initial_value">
  131. <return type="void">
  132. </return>
  133. <argument index="0" name="name" type="String">
  134. </argument>
  135. <argument index="1" name="value" type="Variant">
  136. </argument>
  137. <argument index="2" name="update_current" type="bool">
  138. </argument>
  139. <description>
  140. </description>
  141. </method>
  142. <method name="set_project_metadata">
  143. <return type="void">
  144. </return>
  145. <argument index="0" name="section" type="String">
  146. </argument>
  147. <argument index="1" name="key" type="String">
  148. </argument>
  149. <argument index="2" name="data" type="Variant">
  150. </argument>
  151. <description>
  152. </description>
  153. </method>
  154. <method name="set_recent_dirs">
  155. <return type="void">
  156. </return>
  157. <argument index="0" name="dirs" type="PoolStringArray">
  158. </argument>
  159. <description>
  160. Set the list of recently visited folders in the file dialog for this project.
  161. </description>
  162. </method>
  163. <method name="set_setting">
  164. <return type="void">
  165. </return>
  166. <argument index="0" name="name" type="String">
  167. </argument>
  168. <argument index="1" name="value" type="Variant">
  169. </argument>
  170. <description>
  171. </description>
  172. </method>
  173. </methods>
  174. <signals>
  175. <signal name="settings_changed">
  176. <description>
  177. </description>
  178. </signal>
  179. </signals>
  180. <constants>
  181. </constants>
  182. </class>