EditorSettings.xml 5.3 KB

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