Skip to content
0.2.0-dev Download ZIP
190 lines ·8.5 KB Raw
1<?xml version="1.0" encoding="UTF-8" ?>
2<class name="LabelSettings" inherits="Resource" api_type="core" 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, making it a convenient and flexible way to set up 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_outline_{index}/color" type="Color" setter="" getter="" default="Color(0, 0, 0, 1)">
167 The color of the outline at [code]index[/code].
168 [b]Note:[/b] [code]index[/code] is a value in the [code]0 .. stacked_outline_count - 1[/code] range.
169 </member>
170 <member name="stacked_outline_{index}/size" type="int" setter="" getter="" default="0">
171 The size of the outline at [code]index[/code].
172 [b]Note:[/b] [code]index[/code] is a value in the [code]0 .. stacked_outline_count - 1[/code] range.
173 </member>
174 <member name="stacked_shadow_count" type="int" setter="set_stacked_shadow_count" getter="get_stacked_shadow_count" default="0">
175 The number of stacked shadows.
176 </member>
177 <member name="stacked_shadow_{index}/color" type="Color" setter="" getter="" default="Color(0, 0, 0, 1)">
178 The color of the shadow at [code]index[/code].
179 [b]Note:[/b] [code]index[/code] is a value in the [code]0 .. stacked_shadow_count - 1[/code] range.
180 </member>
181 <member name="stacked_shadow_{index}/offset" type="Vector2" setter="" getter="" default="Vector2(1, 1)">
182 The offset of the shadow at [code]index[/code].
183 [b]Note:[/b] [code]index[/code] is a value in the [code]0 .. stacked_shadow_count - 1[/code] range.
184 </member>
185 <member name="stacked_shadow_{index}/outline_size" type="int" setter="" getter="" default="0">
186 The size of the shadow outline at [code]index[/code].
187 [b]Note:[/b] [code]index[/code] is a value in the [code]0 .. stacked_shadow_count - 1[/code] range.
188 </member>
189 </members>
190</class>