Theme.xml 26 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541
  1. <?xml version="1.0" encoding="UTF-8" ?>
  2. <class name="Theme" inherits="Resource" version="4.0">
  3. <brief_description>
  4. Theme for controls.
  5. </brief_description>
  6. <description>
  7. A theme for skinning controls. Controls can be skinned individually, but for complex applications, it's more practical to just create a global theme that defines everything. This theme can be applied to any [Control]; the Control and its children will automatically use it.
  8. Theme resources can alternatively be loaded by writing them in a [code].theme[/code] file, see the documentation for more information.
  9. </description>
  10. <tutorials>
  11. <link title="GUI skinning">https://docs.godotengine.org/en/latest/tutorials/ui/gui_skinning.html</link>
  12. </tutorials>
  13. <methods>
  14. <method name="clear">
  15. <return type="void" />
  16. <description>
  17. Clears all values on the theme.
  18. </description>
  19. </method>
  20. <method name="clear_color">
  21. <return type="void" />
  22. <argument index="0" name="name" type="StringName" />
  23. <argument index="1" name="theme_type" type="StringName" />
  24. <description>
  25. Clears the [Color] at [code]name[/code] if the theme has [code]theme_type[/code].
  26. </description>
  27. </method>
  28. <method name="clear_constant">
  29. <return type="void" />
  30. <argument index="0" name="name" type="StringName" />
  31. <argument index="1" name="theme_type" type="StringName" />
  32. <description>
  33. Clears the constant at [code]name[/code] if the theme has [code]theme_type[/code].
  34. </description>
  35. </method>
  36. <method name="clear_font">
  37. <return type="void" />
  38. <argument index="0" name="name" type="StringName" />
  39. <argument index="1" name="theme_type" type="StringName" />
  40. <description>
  41. Clears the [Font] at [code]name[/code] if the theme has [code]theme_type[/code].
  42. </description>
  43. </method>
  44. <method name="clear_font_size">
  45. <return type="void" />
  46. <argument index="0" name="name" type="StringName" />
  47. <argument index="1" name="theme_type" type="StringName" />
  48. <description>
  49. Clears the font size [code]name[/code] if the theme has [code]theme_type[/code].
  50. </description>
  51. </method>
  52. <method name="clear_icon">
  53. <return type="void" />
  54. <argument index="0" name="name" type="StringName" />
  55. <argument index="1" name="theme_type" type="StringName" />
  56. <description>
  57. Clears the icon at [code]name[/code] if the theme has [code]theme_type[/code].
  58. </description>
  59. </method>
  60. <method name="clear_stylebox">
  61. <return type="void" />
  62. <argument index="0" name="name" type="StringName" />
  63. <argument index="1" name="theme_type" type="StringName" />
  64. <description>
  65. Clears [StyleBox] at [code]name[/code] if the theme has [code]theme_type[/code].
  66. </description>
  67. </method>
  68. <method name="clear_theme_item">
  69. <return type="void" />
  70. <argument index="0" name="data_type" type="int" enum="Theme.DataType" />
  71. <argument index="1" name="name" type="StringName" />
  72. <argument index="2" name="theme_type" type="StringName" />
  73. <description>
  74. Clears the theme item of [code]data_type[/code] at [code]name[/code] if the theme has [code]theme_type[/code].
  75. </description>
  76. </method>
  77. <method name="clear_type_variation">
  78. <return type="void" />
  79. <argument index="0" name="theme_type" type="StringName" />
  80. <description>
  81. Unmarks [code]theme_type[/code] as being a variation of any other type.
  82. </description>
  83. </method>
  84. <method name="get_color" qualifiers="const">
  85. <return type="Color" />
  86. <argument index="0" name="name" type="StringName" />
  87. <argument index="1" name="theme_type" type="StringName" />
  88. <description>
  89. Returns the [Color] at [code]name[/code] if the theme has [code]theme_type[/code].
  90. </description>
  91. </method>
  92. <method name="get_color_list" qualifiers="const">
  93. <return type="PackedStringArray" />
  94. <argument index="0" name="theme_type" type="String" />
  95. <description>
  96. Returns all the [Color]s as a [PackedStringArray] filled with each [Color]'s name, for use in [method get_color], if the theme has [code]theme_type[/code].
  97. </description>
  98. </method>
  99. <method name="get_color_type_list" qualifiers="const">
  100. <return type="PackedStringArray" />
  101. <description>
  102. Returns all the [Color] types as a [PackedStringArray] filled with unique type names, for use in [method get_color] and/or [method get_color_list].
  103. </description>
  104. </method>
  105. <method name="get_constant" qualifiers="const">
  106. <return type="int" />
  107. <argument index="0" name="name" type="StringName" />
  108. <argument index="1" name="theme_type" type="StringName" />
  109. <description>
  110. Returns the constant at [code]name[/code] if the theme has [code]theme_type[/code].
  111. </description>
  112. </method>
  113. <method name="get_constant_list" qualifiers="const">
  114. <return type="PackedStringArray" />
  115. <argument index="0" name="theme_type" type="String" />
  116. <description>
  117. Returns all the constants as a [PackedStringArray] filled with each constant's name, for use in [method get_constant], if the theme has [code]theme_type[/code].
  118. </description>
  119. </method>
  120. <method name="get_constant_type_list" qualifiers="const">
  121. <return type="PackedStringArray" />
  122. <description>
  123. Returns all the constant types as a [PackedStringArray] filled with unique type names, for use in [method get_constant] and/or [method get_constant_list].
  124. </description>
  125. </method>
  126. <method name="get_font" qualifiers="const">
  127. <return type="Font" />
  128. <argument index="0" name="name" type="StringName" />
  129. <argument index="1" name="theme_type" type="StringName" />
  130. <description>
  131. Returns the [Font] at [code]name[/code] if the theme has [code]theme_type[/code].
  132. </description>
  133. </method>
  134. <method name="get_font_list" qualifiers="const">
  135. <return type="PackedStringArray" />
  136. <argument index="0" name="theme_type" type="String" />
  137. <description>
  138. Returns all the [Font]s as a [PackedStringArray] filled with each [Font]'s name, for use in [method get_font], if the theme has [code]theme_type[/code].
  139. </description>
  140. </method>
  141. <method name="get_font_size" qualifiers="const">
  142. <return type="int" />
  143. <argument index="0" name="name" type="StringName" />
  144. <argument index="1" name="theme_type" type="StringName" />
  145. <description>
  146. Returns the font size at [code]name[/code] if the theme has [code]theme_type[/code].
  147. </description>
  148. </method>
  149. <method name="get_font_size_list" qualifiers="const">
  150. <return type="PackedStringArray" />
  151. <argument index="0" name="theme_type" type="String" />
  152. <description>
  153. Returns all the font sizes as a [PackedStringArray] filled with each font size name, for use in [method get_font_size], if the theme has [code]theme_type[/code].
  154. </description>
  155. </method>
  156. <method name="get_font_size_type_list" qualifiers="const">
  157. <return type="PackedStringArray" />
  158. <description>
  159. Returns all the font size types as a [PackedStringArray] filled with unique type names, for use in [method get_font_size] and/or [method get_font_size_list].
  160. </description>
  161. </method>
  162. <method name="get_font_type_list" qualifiers="const">
  163. <return type="PackedStringArray" />
  164. <description>
  165. Returns all the [Font] types as a [PackedStringArray] filled with unique type names, for use in [method get_font] and/or [method get_font_list].
  166. </description>
  167. </method>
  168. <method name="get_icon" qualifiers="const">
  169. <return type="Texture2D" />
  170. <argument index="0" name="name" type="StringName" />
  171. <argument index="1" name="theme_type" type="StringName" />
  172. <description>
  173. Returns the icon [Texture2D] at [code]name[/code] if the theme has [code]theme_type[/code].
  174. </description>
  175. </method>
  176. <method name="get_icon_list" qualifiers="const">
  177. <return type="PackedStringArray" />
  178. <argument index="0" name="theme_type" type="String" />
  179. <description>
  180. Returns all the icons as a [PackedStringArray] filled with each [Texture2D]'s name, for use in [method get_icon], if the theme has [code]theme_type[/code].
  181. </description>
  182. </method>
  183. <method name="get_icon_type_list" qualifiers="const">
  184. <return type="PackedStringArray" />
  185. <description>
  186. Returns all the icon types as a [PackedStringArray] filled with unique type names, for use in [method get_icon] and/or [method get_icon_list].
  187. </description>
  188. </method>
  189. <method name="get_stylebox" qualifiers="const">
  190. <return type="StyleBox" />
  191. <argument index="0" name="name" type="StringName" />
  192. <argument index="1" name="theme_type" type="StringName" />
  193. <description>
  194. Returns the [StyleBox] at [code]name[/code] if the theme has [code]theme_type[/code].
  195. Valid [code]name[/code]s may be found using [method get_stylebox_list]. Valid [code]theme_type[/code]s may be found using [method get_stylebox_type_list].
  196. </description>
  197. </method>
  198. <method name="get_stylebox_list" qualifiers="const">
  199. <return type="PackedStringArray" />
  200. <argument index="0" name="theme_type" type="String" />
  201. <description>
  202. Returns all the [StyleBox]s as a [PackedStringArray] filled with each [StyleBox]'s name, for use in [method get_stylebox], if the theme has [code]theme_type[/code].
  203. Valid [code]theme_type[/code]s may be found using [method get_stylebox_type_list].
  204. </description>
  205. </method>
  206. <method name="get_stylebox_type_list" qualifiers="const">
  207. <return type="PackedStringArray" />
  208. <description>
  209. Returns all the [StyleBox] types as a [PackedStringArray] filled with unique type names, for use in [method get_stylebox] and/or [method get_stylebox_list].
  210. </description>
  211. </method>
  212. <method name="get_theme_item" qualifiers="const">
  213. <return type="Variant" />
  214. <argument index="0" name="data_type" type="int" enum="Theme.DataType" />
  215. <argument index="1" name="name" type="StringName" />
  216. <argument index="2" name="theme_type" type="StringName" />
  217. <description>
  218. Returns the theme item of [code]data_type[/code] at [code]name[/code] if the theme has [code]theme_type[/code].
  219. Valid [code]name[/code]s may be found using [method get_theme_item_list] or a data type specific method. Valid [code]theme_type[/code]s may be found using [method get_theme_item_type_list] or a data type specific method.
  220. </description>
  221. </method>
  222. <method name="get_theme_item_list" qualifiers="const">
  223. <return type="PackedStringArray" />
  224. <argument index="0" name="data_type" type="int" enum="Theme.DataType" />
  225. <argument index="1" name="theme_type" type="String" />
  226. <description>
  227. Returns all the theme items of [code]data_type[/code] as a [PackedStringArray] filled with each theme items's name, for use in [method get_theme_item] or a data type specific method, if the theme has [code]theme_type[/code].
  228. Valid [code]theme_type[/code]s may be found using [method get_theme_item_type_list] or a data type specific method.
  229. </description>
  230. </method>
  231. <method name="get_theme_item_type_list" qualifiers="const">
  232. <return type="PackedStringArray" />
  233. <argument index="0" name="data_type" type="int" enum="Theme.DataType" />
  234. <description>
  235. Returns all the theme items of [code]data_type[/code] types as a [PackedStringArray] filled with unique type names, for use in [method get_theme_item], [method get_theme_item_list] or data type specific methods.
  236. </description>
  237. </method>
  238. <method name="get_type_list" qualifiers="const">
  239. <return type="PackedStringArray" />
  240. <description>
  241. Returns all the theme types as a [PackedStringArray] filled with unique type names, for use in other [code]get_*[/code] functions of this theme.
  242. </description>
  243. </method>
  244. <method name="get_type_variation_base" qualifiers="const">
  245. <return type="StringName" />
  246. <argument index="0" name="theme_type" type="StringName" />
  247. <description>
  248. Returns the base theme type if [code]theme_type[/code] is a valid variation type. Returns an empty string otherwise.
  249. </description>
  250. </method>
  251. <method name="get_type_variation_list" qualifiers="const">
  252. <return type="PackedStringArray" />
  253. <argument index="0" name="base_type" type="StringName" />
  254. <description>
  255. Returns a list of all variation for the given [code]base_type[/code].
  256. </description>
  257. </method>
  258. <method name="has_color" qualifiers="const">
  259. <return type="bool" />
  260. <argument index="0" name="name" type="StringName" />
  261. <argument index="1" name="theme_type" type="StringName" />
  262. <description>
  263. Returns [code]true[/code] if [Color] with [code]name[/code] is in [code]theme_type[/code].
  264. Returns [code]false[/code] if the theme does not have [code]theme_type[/code].
  265. </description>
  266. </method>
  267. <method name="has_constant" qualifiers="const">
  268. <return type="bool" />
  269. <argument index="0" name="name" type="StringName" />
  270. <argument index="1" name="theme_type" type="StringName" />
  271. <description>
  272. Returns [code]true[/code] if constant with [code]name[/code] is in [code]theme_type[/code].
  273. Returns [code]false[/code] if the theme does not have [code]theme_type[/code].
  274. </description>
  275. </method>
  276. <method name="has_default_base_scale" qualifiers="const">
  277. <return type="bool" />
  278. <description>
  279. Returns [code]true[/code] if this theme has a valid [member default_base_scale] value.
  280. </description>
  281. </method>
  282. <method name="has_default_font" qualifiers="const">
  283. <return type="bool" />
  284. <description>
  285. Returns [code]true[/code] if this theme has a valid [member default_font] value.
  286. </description>
  287. </method>
  288. <method name="has_default_font_size" qualifiers="const">
  289. <return type="bool" />
  290. <description>
  291. Returns [code]true[/code] if this theme has a valid [member default_font_size] value.
  292. </description>
  293. </method>
  294. <method name="has_font" qualifiers="const">
  295. <return type="bool" />
  296. <argument index="0" name="name" type="StringName" />
  297. <argument index="1" name="theme_type" type="StringName" />
  298. <description>
  299. Returns [code]true[/code] if [Font] with [code]name[/code] is in [code]theme_type[/code].
  300. Returns [code]false[/code] if the theme does not have [code]theme_type[/code].
  301. </description>
  302. </method>
  303. <method name="has_font_size" qualifiers="const">
  304. <return type="bool" />
  305. <argument index="0" name="name" type="StringName" />
  306. <argument index="1" name="theme_type" type="StringName" />
  307. <description>
  308. Returns [code]true[/code] if font size with [code]name[/code] is in [code]theme_type[/code].
  309. Returns [code]false[/code] if the theme does not have [code]theme_type[/code].
  310. </description>
  311. </method>
  312. <method name="has_icon" qualifiers="const">
  313. <return type="bool" />
  314. <argument index="0" name="name" type="StringName" />
  315. <argument index="1" name="theme_type" type="StringName" />
  316. <description>
  317. Returns [code]true[/code] if icon [Texture2D] with [code]name[/code] is in [code]theme_type[/code].
  318. Returns [code]false[/code] if the theme does not have [code]theme_type[/code].
  319. </description>
  320. </method>
  321. <method name="has_stylebox" qualifiers="const">
  322. <return type="bool" />
  323. <argument index="0" name="name" type="StringName" />
  324. <argument index="1" name="theme_type" type="StringName" />
  325. <description>
  326. Returns [code]true[/code] if [StyleBox] with [code]name[/code] is in [code]theme_type[/code].
  327. Returns [code]false[/code] if the theme does not have [code]theme_type[/code].
  328. </description>
  329. </method>
  330. <method name="has_theme_item" qualifiers="const">
  331. <return type="bool" />
  332. <argument index="0" name="data_type" type="int" enum="Theme.DataType" />
  333. <argument index="1" name="name" type="StringName" />
  334. <argument index="2" name="theme_type" type="StringName" />
  335. <description>
  336. Returns [code]true[/code] if a theme item of [code]data_type[/code] with [code]name[/code] is in [code]theme_type[/code].
  337. Returns [code]false[/code] if the theme does not have [code]theme_type[/code].
  338. </description>
  339. </method>
  340. <method name="is_type_variation" qualifiers="const">
  341. <return type="bool" />
  342. <argument index="0" name="theme_type" type="StringName" />
  343. <argument index="1" name="base_type" type="StringName" />
  344. <description>
  345. Returns [code]true[/code] if [code]theme_type[/code] is marked as a variation of [code]base_type[/code] in this theme.
  346. </description>
  347. </method>
  348. <method name="merge_with">
  349. <return type="void" />
  350. <argument index="0" name="other" type="Theme" />
  351. <description>
  352. Adds missing and overrides existing definitions with values from the [code]other[/code] [Theme].
  353. [b]Note:[/b] This modifies the current theme. If you want to merge two themes together without modifying either one, create a new empty theme and merge the other two into it one after another.
  354. </description>
  355. </method>
  356. <method name="rename_color">
  357. <return type="void" />
  358. <argument index="0" name="old_name" type="StringName" />
  359. <argument index="1" name="name" type="StringName" />
  360. <argument index="2" name="theme_type" type="StringName" />
  361. <description>
  362. Renames the [Color] at [code]old_name[/code] to [code]name[/code] if the theme has [code]theme_type[/code]. If [code]name[/code] is already taken, this method fails.
  363. </description>
  364. </method>
  365. <method name="rename_constant">
  366. <return type="void" />
  367. <argument index="0" name="old_name" type="StringName" />
  368. <argument index="1" name="name" type="StringName" />
  369. <argument index="2" name="theme_type" type="StringName" />
  370. <description>
  371. Renames the constant at [code]old_name[/code] to [code]name[/code] if the theme has [code]theme_type[/code]. If [code]name[/code] is already taken, this method fails.
  372. </description>
  373. </method>
  374. <method name="rename_font">
  375. <return type="void" />
  376. <argument index="0" name="old_name" type="StringName" />
  377. <argument index="1" name="name" type="StringName" />
  378. <argument index="2" name="theme_type" type="StringName" />
  379. <description>
  380. Renames the [Font] at [code]old_name[/code] to [code]name[/code] if the theme has [code]theme_type[/code]. If [code]name[/code] is already taken, this method fails.
  381. </description>
  382. </method>
  383. <method name="rename_font_size">
  384. <return type="void" />
  385. <argument index="0" name="old_name" type="StringName" />
  386. <argument index="1" name="name" type="StringName" />
  387. <argument index="2" name="theme_type" type="StringName" />
  388. <description>
  389. Renames the font size [code]old_name[/code] to [code]name[/code] if the theme has [code]theme_type[/code]. If [code]name[/code] is already taken, this method fails.
  390. </description>
  391. </method>
  392. <method name="rename_icon">
  393. <return type="void" />
  394. <argument index="0" name="old_name" type="StringName" />
  395. <argument index="1" name="name" type="StringName" />
  396. <argument index="2" name="theme_type" type="StringName" />
  397. <description>
  398. Renames the icon at [code]old_name[/code] to [code]name[/code] if the theme has [code]theme_type[/code]. If [code]name[/code] is already taken, this method fails.
  399. </description>
  400. </method>
  401. <method name="rename_stylebox">
  402. <return type="void" />
  403. <argument index="0" name="old_name" type="StringName" />
  404. <argument index="1" name="name" type="StringName" />
  405. <argument index="2" name="theme_type" type="StringName" />
  406. <description>
  407. Renames [StyleBox] at [code]old_name[/code] to [code]name[/code] if the theme has [code]theme_type[/code]. If [code]name[/code] is already taken, this method fails.
  408. </description>
  409. </method>
  410. <method name="rename_theme_item">
  411. <return type="void" />
  412. <argument index="0" name="data_type" type="int" enum="Theme.DataType" />
  413. <argument index="1" name="old_name" type="StringName" />
  414. <argument index="2" name="name" type="StringName" />
  415. <argument index="3" name="theme_type" type="StringName" />
  416. <description>
  417. Renames the theme item of [code]data_type[/code] at [code]old_name[/code] to [code]name[/code] if the theme has [code]theme_type[/code]. If [code]name[/code] is already taken, this method fails.
  418. </description>
  419. </method>
  420. <method name="set_color">
  421. <return type="void" />
  422. <argument index="0" name="name" type="StringName" />
  423. <argument index="1" name="theme_type" type="StringName" />
  424. <argument index="2" name="color" type="Color" />
  425. <description>
  426. Sets the theme's [Color] to [code]color[/code] at [code]name[/code] in [code]theme_type[/code].
  427. Creates [code]theme_type[/code] if the theme does not have it.
  428. </description>
  429. </method>
  430. <method name="set_constant">
  431. <return type="void" />
  432. <argument index="0" name="name" type="StringName" />
  433. <argument index="1" name="theme_type" type="StringName" />
  434. <argument index="2" name="constant" type="int" />
  435. <description>
  436. Sets the theme's constant to [code]constant[/code] at [code]name[/code] in [code]theme_type[/code].
  437. Creates [code]theme_type[/code] if the theme does not have it.
  438. </description>
  439. </method>
  440. <method name="set_font">
  441. <return type="void" />
  442. <argument index="0" name="name" type="StringName" />
  443. <argument index="1" name="theme_type" type="StringName" />
  444. <argument index="2" name="font" type="Font" />
  445. <description>
  446. Sets the theme's [Font] to [code]font[/code] at [code]name[/code] in [code]theme_type[/code].
  447. Creates [code]theme_type[/code] if the theme does not have it.
  448. </description>
  449. </method>
  450. <method name="set_font_size">
  451. <return type="void" />
  452. <argument index="0" name="name" type="StringName" />
  453. <argument index="1" name="theme_type" type="StringName" />
  454. <argument index="2" name="font_size" type="int" />
  455. <description>
  456. Sets the theme's font size to [code]font_size[/code] at [code]name[/code] in [code]theme_type[/code].
  457. Creates [code]theme_type[/code] if the theme does not have it.
  458. </description>
  459. </method>
  460. <method name="set_icon">
  461. <return type="void" />
  462. <argument index="0" name="name" type="StringName" />
  463. <argument index="1" name="theme_type" type="StringName" />
  464. <argument index="2" name="texture" type="Texture2D" />
  465. <description>
  466. Sets the theme's icon [Texture2D] to [code]texture[/code] at [code]name[/code] in [code]theme_type[/code].
  467. Creates [code]theme_type[/code] if the theme does not have it.
  468. </description>
  469. </method>
  470. <method name="set_stylebox">
  471. <return type="void" />
  472. <argument index="0" name="name" type="StringName" />
  473. <argument index="1" name="theme_type" type="StringName" />
  474. <argument index="2" name="texture" type="StyleBox" />
  475. <description>
  476. Sets theme's [StyleBox] to [code]stylebox[/code] at [code]name[/code] in [code]theme_type[/code].
  477. Creates [code]theme_type[/code] if the theme does not have it.
  478. </description>
  479. </method>
  480. <method name="set_theme_item">
  481. <return type="void" />
  482. <argument index="0" name="data_type" type="int" enum="Theme.DataType" />
  483. <argument index="1" name="name" type="StringName" />
  484. <argument index="2" name="theme_type" type="StringName" />
  485. <argument index="3" name="value" type="Variant" />
  486. <description>
  487. Sets the theme item of [code]data_type[/code] to [code]value[/code] at [code]name[/code] in [code]theme_type[/code].
  488. Does nothing if the [code]value[/code] type does not match [code]data_type[/code].
  489. Creates [code]theme_type[/code] if the theme does not have it.
  490. </description>
  491. </method>
  492. <method name="set_type_variation">
  493. <return type="void" />
  494. <argument index="0" name="theme_type" type="StringName" />
  495. <argument index="1" name="base_type" type="StringName" />
  496. <description>
  497. Marks [code]theme_type[/code] as being a variation of [code]base_type[/code].
  498. This adds [code]theme_type[/code] as a suggested option for [member Control.theme_type_variation] on a [Control] that is of the [code]base_type[/code] class.
  499. Variations can also be nested, i.e. [code]base_type[/code] can be another variation. If a chain of variations ends with a [code]base_type[/code] matching a class of a [Control], the whole chain is going to be suggested as options.
  500. [b]Note:[/b] Suggestions only show up if this [Theme] is set as the project default theme. See [member ProjectSettings.gui/theme/custom].
  501. </description>
  502. </method>
  503. </methods>
  504. <members>
  505. <member name="default_base_scale" type="float" setter="set_default_base_scale" getter="get_default_base_scale" default="0.0">
  506. The default base scale factor of this [Theme] resource. Used by some controls to scale their visual properties based on a global scale factor. If this value is set to [code]0.0[/code], the global scale factor is used.
  507. Use [method has_default_base_scale] to check if this value is valid.
  508. </member>
  509. <member name="default_font" type="Font" setter="set_default_font" getter="get_default_font">
  510. The default font of this [Theme] resource. Used as a fallback value for font items defined in this theme, but having invalid values. If this value is also invalid, the global default value is used.
  511. Use [method has_default_font] to check if this value is valid.
  512. </member>
  513. <member name="default_font_size" type="int" setter="set_default_font_size" getter="get_default_font_size" default="-1">
  514. The default font size of this [Theme] resource. Used as a fallback value for font size items defined in this theme, but having invalid values. If this value is set to [code]-1[/code], the global default value is used.
  515. Use [method has_default_font_size] to check if this value is valid.
  516. </member>
  517. </members>
  518. <constants>
  519. <constant name="DATA_TYPE_COLOR" value="0" enum="DataType">
  520. Theme's [Color] item type.
  521. </constant>
  522. <constant name="DATA_TYPE_CONSTANT" value="1" enum="DataType">
  523. Theme's constant item type.
  524. </constant>
  525. <constant name="DATA_TYPE_FONT" value="2" enum="DataType">
  526. Theme's [Font] item type.
  527. </constant>
  528. <constant name="DATA_TYPE_FONT_SIZE" value="3" enum="DataType">
  529. Theme's font size item type.
  530. </constant>
  531. <constant name="DATA_TYPE_ICON" value="4" enum="DataType">
  532. Theme's icon [Texture2D] item type.
  533. </constant>
  534. <constant name="DATA_TYPE_STYLEBOX" value="5" enum="DataType">
  535. Theme's [StyleBox] item type.
  536. </constant>
  537. <constant name="DATA_TYPE_MAX" value="6" enum="DataType">
  538. Maximum value for the DataType enum.
  539. </constant>
  540. </constants>
  541. </class>