StyleBoxFlat.xml 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339
  1. <?xml version="1.0" encoding="UTF-8" ?>
  2. <class name="StyleBoxFlat" inherits="StyleBox" category="Core" version="3.0.alpha.custom_build">
  3. <brief_description>
  4. Customizable Stylebox with a given set of parameters. (no texture required)
  5. </brief_description>
  6. <description>
  7. This stylebox can be used to achieve all kinds of looks without the need of a texture. Those properties are customizable:
  8. - Color
  9. - Border width (individual width for each border)
  10. - Rounded corners (individual radius for each corner)
  11. - Shadow
  12. About corner radius:
  13. Setting corner radius to high values is allowed. As soon as corners would overlap the stylebox will switch to a relative system. Example:
  14. [codeblock]
  15. height = 30
  16. corner_radius_top_left = 50
  17. corner_radius_bottom_left = 100
  18. [/codeblock]
  19. The relative system now would take the 1:2 ratio of the two left corners to calculate the actual corner width. Both corners added will [b]never[/b] be more than the height. Result:
  20. [codeblock]
  21. corner_radius_top_left: 10
  22. corner_radius_bottom_left: 20
  23. [/codeblock]
  24. </description>
  25. <tutorials>
  26. </tutorials>
  27. <demos>
  28. </demos>
  29. <methods>
  30. <method name="get_aa_size" qualifiers="const">
  31. <return type="int">
  32. </return>
  33. <description>
  34. </description>
  35. </method>
  36. <method name="get_bg_color" qualifiers="const">
  37. <return type="Color">
  38. </return>
  39. <description>
  40. </description>
  41. </method>
  42. <method name="get_border_blend" qualifiers="const">
  43. <return type="bool">
  44. </return>
  45. <description>
  46. </description>
  47. </method>
  48. <method name="get_border_color" qualifiers="const">
  49. <return type="Color">
  50. </return>
  51. <description>
  52. </description>
  53. </method>
  54. <method name="get_border_width" qualifiers="const">
  55. <return type="int">
  56. </return>
  57. <argument index="0" name="margin" type="int" enum="Margin">
  58. </argument>
  59. <description>
  60. </description>
  61. </method>
  62. <method name="get_border_width_min" qualifiers="const">
  63. <return type="int">
  64. </return>
  65. <description>
  66. </description>
  67. </method>
  68. <method name="get_corner_detail" qualifiers="const">
  69. <return type="int">
  70. </return>
  71. <description>
  72. </description>
  73. </method>
  74. <method name="get_corner_radius" qualifiers="const">
  75. <return type="int">
  76. </return>
  77. <argument index="0" name="corner" type="int" enum="Corner">
  78. </argument>
  79. <description>
  80. </description>
  81. </method>
  82. <method name="get_expand_margin" qualifiers="const">
  83. <return type="float">
  84. </return>
  85. <argument index="0" name="margin" type="int" enum="Margin">
  86. </argument>
  87. <description>
  88. </description>
  89. </method>
  90. <method name="get_shadow_color" qualifiers="const">
  91. <return type="Color">
  92. </return>
  93. <description>
  94. </description>
  95. </method>
  96. <method name="get_shadow_size" qualifiers="const">
  97. <return type="int">
  98. </return>
  99. <description>
  100. </description>
  101. </method>
  102. <method name="is_anti_aliased" qualifiers="const">
  103. <return type="bool">
  104. </return>
  105. <description>
  106. </description>
  107. </method>
  108. <method name="is_draw_center_enabled" qualifiers="const">
  109. <return type="bool">
  110. </return>
  111. <description>
  112. </description>
  113. </method>
  114. <method name="set_aa_size">
  115. <return type="void">
  116. </return>
  117. <argument index="0" name="size" type="int">
  118. </argument>
  119. <description>
  120. </description>
  121. </method>
  122. <method name="set_anti_aliased">
  123. <return type="void">
  124. </return>
  125. <argument index="0" name="anti_aliased" type="bool">
  126. </argument>
  127. <description>
  128. </description>
  129. </method>
  130. <method name="set_bg_color">
  131. <return type="void">
  132. </return>
  133. <argument index="0" name="color" type="Color">
  134. </argument>
  135. <description>
  136. </description>
  137. </method>
  138. <method name="set_border_blend">
  139. <return type="void">
  140. </return>
  141. <argument index="0" name="blend" type="bool">
  142. </argument>
  143. <description>
  144. </description>
  145. </method>
  146. <method name="set_border_color">
  147. <return type="void">
  148. </return>
  149. <argument index="0" name="color" type="Color">
  150. </argument>
  151. <description>
  152. </description>
  153. </method>
  154. <method name="set_border_width">
  155. <return type="void">
  156. </return>
  157. <argument index="0" name="margin" type="int" enum="Margin">
  158. </argument>
  159. <argument index="1" name="width" type="int">
  160. </argument>
  161. <description>
  162. </description>
  163. </method>
  164. <method name="set_border_width_all">
  165. <return type="void">
  166. </return>
  167. <argument index="0" name="width" type="int">
  168. </argument>
  169. <description>
  170. </description>
  171. </method>
  172. <method name="set_corner_detail">
  173. <return type="void">
  174. </return>
  175. <argument index="0" name="detail" type="int">
  176. </argument>
  177. <description>
  178. </description>
  179. </method>
  180. <method name="set_corner_radius">
  181. <return type="void">
  182. </return>
  183. <argument index="0" name="corner" type="int" enum="Corner">
  184. </argument>
  185. <argument index="1" name="radius" type="int">
  186. </argument>
  187. <description>
  188. </description>
  189. </method>
  190. <method name="set_corner_radius_all">
  191. <return type="void">
  192. </return>
  193. <argument index="0" name="radius" type="int">
  194. </argument>
  195. <description>
  196. </description>
  197. </method>
  198. <method name="set_corner_radius_individual">
  199. <return type="void">
  200. </return>
  201. <argument index="0" name="radius_top_left" type="int">
  202. </argument>
  203. <argument index="1" name="radius_top_right" type="int">
  204. </argument>
  205. <argument index="2" name="radius_bottom_right" type="int">
  206. </argument>
  207. <argument index="3" name="radius_bottom_left" type="int">
  208. </argument>
  209. <description>
  210. </description>
  211. </method>
  212. <method name="set_draw_center">
  213. <return type="void">
  214. </return>
  215. <argument index="0" name="draw_center" type="bool">
  216. </argument>
  217. <description>
  218. </description>
  219. </method>
  220. <method name="set_expand_margin">
  221. <return type="void">
  222. </return>
  223. <argument index="0" name="margin" type="int" enum="Margin">
  224. </argument>
  225. <argument index="1" name="size" type="float">
  226. </argument>
  227. <description>
  228. </description>
  229. </method>
  230. <method name="set_expand_margin_all">
  231. <return type="void">
  232. </return>
  233. <argument index="0" name="size" type="float">
  234. </argument>
  235. <description>
  236. </description>
  237. </method>
  238. <method name="set_expand_margin_individual">
  239. <return type="void">
  240. </return>
  241. <argument index="0" name="size_left" type="float">
  242. </argument>
  243. <argument index="1" name="size_top" type="float">
  244. </argument>
  245. <argument index="2" name="size_right" type="float">
  246. </argument>
  247. <argument index="3" name="size_bottom" type="float">
  248. </argument>
  249. <description>
  250. </description>
  251. </method>
  252. <method name="set_shadow_color">
  253. <return type="void">
  254. </return>
  255. <argument index="0" name="color" type="Color">
  256. </argument>
  257. <description>
  258. </description>
  259. </method>
  260. <method name="set_shadow_size">
  261. <return type="void">
  262. </return>
  263. <argument index="0" name="size" type="int">
  264. </argument>
  265. <description>
  266. </description>
  267. </method>
  268. </methods>
  269. <members>
  270. <member name="anti_aliasing" type="bool" setter="set_anti_aliased" getter="is_anti_aliased">
  271. Anti Aliasing draws a small ring around edges. This ring fades to transparent. As a result edges look much smoother. This is only noticeable when using rounded corners.
  272. </member>
  273. <member name="anti_aliasing_size" type="int" setter="set_aa_size" getter="get_aa_size">
  274. This changes the size of the faded ring. Higher values can be used to achieve a "blurry" effect.
  275. </member>
  276. <member name="bg_color" type="Color" setter="set_bg_color" getter="get_bg_color">
  277. The background color of the stylebox.
  278. </member>
  279. <member name="border_blend" type="bool" setter="set_border_blend" getter="get_border_blend">
  280. When set to true, the border will fade into the background color.
  281. </member>
  282. <member name="border_color" type="Color" setter="set_border_color" getter="get_border_color">
  283. Sets the color of the border.
  284. </member>
  285. <member name="border_width_bottom" type="int" setter="set_border_width" getter="get_border_width">
  286. Border width for the bottom border.
  287. </member>
  288. <member name="border_width_left" type="int" setter="set_border_width" getter="get_border_width">
  289. Border width for the left border.
  290. </member>
  291. <member name="border_width_right" type="int" setter="set_border_width" getter="get_border_width">
  292. Border width for the right border.
  293. </member>
  294. <member name="border_width_top" type="int" setter="set_border_width" getter="get_border_width">
  295. Border width for the top border.
  296. </member>
  297. <member name="corner_detail" type="int" setter="set_corner_detail" getter="get_corner_detail">
  298. This sets the amount of vertices used for each corner. Higher values result in rounder corners but take more processing power to compute. When choosing a value you should take the corner radius ([method set_corner_radius]) into account.
  299. For corner radius smaller than 10: 4-5 should be enough
  300. For corner radius smaller than 30: 8-12 should be enough ...
  301. </member>
  302. <member name="corner_radius_bottom_left" type="int" setter="set_corner_radius" getter="get_corner_radius">
  303. The corner radius of the bottom left corner. When set to 0 the corner is not rounded.
  304. </member>
  305. <member name="corner_radius_bottom_right" type="int" setter="set_corner_radius" getter="get_corner_radius">
  306. The corner radius of the bottom right corner. When set to 0 the corner is not rounded.
  307. </member>
  308. <member name="corner_radius_top_left" type="int" setter="set_corner_radius" getter="get_corner_radius">
  309. The corner radius of the top left corner. When set to 0 the corner is not rounded.
  310. </member>
  311. <member name="corner_radius_top_right" type="int" setter="set_corner_radius" getter="get_corner_radius">
  312. The corner radius of the top right corner. When set to 0 the corner is not rounded.
  313. </member>
  314. <member name="draw_center" type="bool" setter="set_draw_center" getter="is_draw_center_enabled">
  315. Toggels drawing of the inner part of the stylebox.
  316. </member>
  317. <member name="expand_margin_bottom" type="float" setter="set_expand_margin" getter="get_expand_margin">
  318. Expands the stylebox outside of the control rect on the bottom edge. Useful in combination with border_width_bottom. To draw a border outside the control rect.
  319. </member>
  320. <member name="expand_margin_left" type="float" setter="set_expand_margin" getter="get_expand_margin">
  321. Expands the stylebox outside of the control rect on the left edge. Useful in combination with border_width_left. To draw a border outside the control rect.
  322. </member>
  323. <member name="expand_margin_right" type="float" setter="set_expand_margin" getter="get_expand_margin">
  324. Expands the stylebox outside of the control rect on the right edge. Useful in combination with border_width_right. To draw a border outside the control rect.
  325. </member>
  326. <member name="expand_margin_top" type="float" setter="set_expand_margin" getter="get_expand_margin">
  327. Expands the stylebox outside of the control rect on the top edge. Useful in combination with border_width_top. To draw a border outside the control rect.
  328. </member>
  329. <member name="shadow_color" type="Color" setter="set_shadow_color" getter="get_shadow_color">
  330. The color of the shadow. (This has no effect when shadow_size &lt; 1)
  331. </member>
  332. <member name="shadow_size" type="int" setter="set_shadow_size" getter="get_shadow_size">
  333. The shadow size in pixels.
  334. </member>
  335. </members>
  336. <constants>
  337. </constants>
  338. </class>