LabelSettings.xml 7.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170
  1. <?xml version="1.0" encoding="UTF-8" ?>
  2. <class name="LabelSettings" inherits="Resource" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
  3. <brief_description>
  4. Provides common settings to customize the text in a [Label].
  5. </brief_description>
  6. <description>
  7. [LabelSettings] is a resource that provides common settings to customize the text in a [Label]. It will take priority over the properties defined in [member Control.theme]. The resource can be shared between multiple labels and changed on the fly, so it's convenient and flexible way to setup text style.
  8. </description>
  9. <tutorials>
  10. </tutorials>
  11. <methods>
  12. <method name="add_stacked_outline">
  13. <return type="void" />
  14. <param index="0" name="index" type="int" default="-1" />
  15. <description>
  16. Adds a new stacked outline to the label at the given [param index]. If [param index] is [code]-1[/code], the new stacked outline will be added at the end of the list.
  17. </description>
  18. </method>
  19. <method name="add_stacked_shadow">
  20. <return type="void" />
  21. <param index="0" name="index" type="int" default="-1" />
  22. <description>
  23. Adds a new stacked shadow to the label at the given [param index]. If [param index] is [code]-1[/code], the new stacked shadow will be added at the end of the list.
  24. </description>
  25. </method>
  26. <method name="get_stacked_outline_color" qualifiers="const">
  27. <return type="Color" />
  28. <param index="0" name="index" type="int" />
  29. <description>
  30. Returns the color of the stacked outline at [param index].
  31. </description>
  32. </method>
  33. <method name="get_stacked_outline_size" qualifiers="const">
  34. <return type="int" />
  35. <param index="0" name="index" type="int" />
  36. <description>
  37. Returns the size of the stacked outline at [param index].
  38. </description>
  39. </method>
  40. <method name="get_stacked_shadow_color" qualifiers="const">
  41. <return type="Color" />
  42. <param index="0" name="index" type="int" />
  43. <description>
  44. Returns the color of the stacked shadow at [param index].
  45. </description>
  46. </method>
  47. <method name="get_stacked_shadow_offset" qualifiers="const">
  48. <return type="Vector2" />
  49. <param index="0" name="index" type="int" />
  50. <description>
  51. Returns the offset of the stacked shadow at [param index].
  52. </description>
  53. </method>
  54. <method name="get_stacked_shadow_outline_size" qualifiers="const">
  55. <return type="int" />
  56. <param index="0" name="index" type="int" />
  57. <description>
  58. Returns the outline size of the stacked shadow at [param index].
  59. </description>
  60. </method>
  61. <method name="move_stacked_outline">
  62. <return type="void" />
  63. <param index="0" name="from_index" type="int" />
  64. <param index="1" name="to_position" type="int" />
  65. <description>
  66. Moves the stacked outline at index [param from_index] to the given position [param to_position] in the array.
  67. </description>
  68. </method>
  69. <method name="move_stacked_shadow">
  70. <return type="void" />
  71. <param index="0" name="from_index" type="int" />
  72. <param index="1" name="to_position" type="int" />
  73. <description>
  74. Moves the stacked shadow at index [param from_index] to the given position [param to_position] in the array.
  75. </description>
  76. </method>
  77. <method name="remove_stacked_outline">
  78. <return type="void" />
  79. <param index="0" name="index" type="int" />
  80. <description>
  81. Removes the stacked outline at index [param index].
  82. </description>
  83. </method>
  84. <method name="remove_stacked_shadow">
  85. <return type="void" />
  86. <param index="0" name="index" type="int" />
  87. <description>
  88. Removes the stacked shadow at index [param index].
  89. </description>
  90. </method>
  91. <method name="set_stacked_outline_color">
  92. <return type="void" />
  93. <param index="0" name="index" type="int" />
  94. <param index="1" name="color" type="Color" />
  95. <description>
  96. Sets the color of the stacked outline identified by the given [param index] to [param color].
  97. </description>
  98. </method>
  99. <method name="set_stacked_outline_size">
  100. <return type="void" />
  101. <param index="0" name="index" type="int" />
  102. <param index="1" name="size" type="int" />
  103. <description>
  104. Sets the size of the stacked outline identified by the given [param index] to [param size].
  105. </description>
  106. </method>
  107. <method name="set_stacked_shadow_color">
  108. <return type="void" />
  109. <param index="0" name="index" type="int" />
  110. <param index="1" name="color" type="Color" />
  111. <description>
  112. Sets the color of the stacked shadow identified by the given [param index] to [param color].
  113. </description>
  114. </method>
  115. <method name="set_stacked_shadow_offset">
  116. <return type="void" />
  117. <param index="0" name="index" type="int" />
  118. <param index="1" name="offset" type="Vector2" />
  119. <description>
  120. Sets the offset of the stacked shadow identified by the given [param index] to [param offset].
  121. </description>
  122. </method>
  123. <method name="set_stacked_shadow_outline_size">
  124. <return type="void" />
  125. <param index="0" name="index" type="int" />
  126. <param index="1" name="size" type="int" />
  127. <description>
  128. Sets the outline size of the stacked shadow identified by the given [param index] to [param size].
  129. </description>
  130. </method>
  131. </methods>
  132. <members>
  133. <member name="font" type="Font" setter="set_font" getter="get_font">
  134. [Font] used for the text.
  135. </member>
  136. <member name="font_color" type="Color" setter="set_font_color" getter="get_font_color" default="Color(1, 1, 1, 1)">
  137. Color of the text.
  138. </member>
  139. <member name="font_size" type="int" setter="set_font_size" getter="get_font_size" default="16">
  140. Size of the text.
  141. </member>
  142. <member name="line_spacing" type="float" setter="set_line_spacing" getter="get_line_spacing" default="3.0">
  143. Additional vertical spacing between lines (in pixels), spacing is added to line descent. This value can be negative.
  144. </member>
  145. <member name="outline_color" type="Color" setter="set_outline_color" getter="get_outline_color" default="Color(1, 1, 1, 1)">
  146. The color of the outline.
  147. </member>
  148. <member name="outline_size" type="int" setter="set_outline_size" getter="get_outline_size" default="0">
  149. Text outline size.
  150. </member>
  151. <member name="paragraph_spacing" type="float" setter="set_paragraph_spacing" getter="get_paragraph_spacing" default="0.0">
  152. Vertical space between paragraphs. Added on top of [member line_spacing].
  153. </member>
  154. <member name="shadow_color" type="Color" setter="set_shadow_color" getter="get_shadow_color" default="Color(0, 0, 0, 0)">
  155. Color of the shadow effect. If alpha is [code]0[/code], no shadow will be drawn.
  156. </member>
  157. <member name="shadow_offset" type="Vector2" setter="set_shadow_offset" getter="get_shadow_offset" default="Vector2(1, 1)">
  158. Offset of the shadow effect, in pixels.
  159. </member>
  160. <member name="shadow_size" type="int" setter="set_shadow_size" getter="get_shadow_size" default="1">
  161. Size of the shadow effect.
  162. </member>
  163. <member name="stacked_outline_count" type="int" setter="set_stacked_outline_count" getter="get_stacked_outline_count" default="0">
  164. The number of stacked outlines.
  165. </member>
  166. <member name="stacked_shadow_count" type="int" setter="set_stacked_shadow_count" getter="get_stacked_shadow_count" default="0">
  167. Returns the stacked shadow count.
  168. </member>
  169. </members>
  170. </class>