blob: afcca416d34bc79af6e6d7362c1bb65917221903 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
|
<?xml version="1.0" encoding="UTF-8" ?>
<class name="Label" inherits="Control" category="Core" version="3.0.alpha.custom_build">
<brief_description>
Control that displays formatted text.
</brief_description>
<description>
Label is a control that displays formatted text, optionally autowrapping it to the [Control] area. It inherits from range to be able to scroll wrapped text vertically.
</description>
<tutorials>
</tutorials>
<demos>
</demos>
<methods>
<method name="get_align" qualifiers="const">
<return type="int" enum="Label.Align">
</return>
<description>
Return the alignment mode (any of the ALIGN_* enumeration values).
</description>
</method>
<method name="get_line_count" qualifiers="const">
<return type="int">
</return>
<description>
Return the amount of lines.
</description>
</method>
<method name="get_line_height" qualifiers="const">
<return type="int">
</return>
<description>
Return the height of a line.
</description>
</method>
<method name="get_lines_skipped" qualifiers="const">
<return type="int">
</return>
<description>
Return the the number of lines to skipped before displaying.
</description>
</method>
<method name="get_max_lines_visible" qualifiers="const">
<return type="int">
</return>
<description>
Return the restricted number of lines to display. Returns -1 if unrestricted.
</description>
</method>
<method name="get_percent_visible" qualifiers="const">
<return type="float">
</return>
<description>
Return the restricted number of characters to display (as a percentage of the total text).
</description>
</method>
<method name="get_text" qualifiers="const">
<return type="String">
</return>
<description>
Return the label text. Text can contain newlines.
</description>
</method>
<method name="get_total_character_count" qualifiers="const">
<return type="int">
</return>
<description>
Return the total length of the text.
</description>
</method>
<method name="get_valign" qualifiers="const">
<return type="int" enum="Label.VAlign">
</return>
<description>
Return the vertical alignment mode (any of the VALIGN_* enumeration values).
</description>
</method>
<method name="get_visible_characters" qualifiers="const">
<return type="int">
</return>
<description>
Return the restricted number of characters to display. Returns -1 if unrestricted.
</description>
</method>
<method name="get_visible_line_count" qualifiers="const">
<return type="int">
</return>
<description>
</description>
</method>
<method name="has_autowrap" qualifiers="const">
<return type="bool">
</return>
<description>
Return the state of the [i]autowrap[/i] mode (see [method set_autowrap]).
</description>
</method>
<method name="is_clipping_text" qualifiers="const">
<return type="bool">
</return>
<description>
Return true if text would be cut off if it is too wide.
</description>
</method>
<method name="is_uppercase" qualifiers="const">
<return type="bool">
</return>
<description>
Return true if text is displayed in all capitals.
</description>
</method>
<method name="set_align">
<return type="void">
</return>
<argument index="0" name="align" type="int" enum="Label.Align">
</argument>
<description>
Sets the alignment mode to any of the ALIGN_* enumeration values.
</description>
</method>
<method name="set_autowrap">
<return type="void">
</return>
<argument index="0" name="enable" type="bool">
</argument>
<description>
Set [i]autowrap[/i] mode. When enabled, autowrap will fit text to the control width, breaking sentences when they exceed the available horizontal space. When disabled, the label minimum width becomes the width of the longest row, and the minimum height large enough to fit all rows.
</description>
</method>
<method name="set_clip_text">
<return type="void">
</return>
<argument index="0" name="enable" type="bool">
</argument>
<description>
Cuts off the rest of the text if it is too wide.
</description>
</method>
<method name="set_lines_skipped">
<return type="void">
</return>
<argument index="0" name="lines_skipped" type="int">
</argument>
<description>
Sets the number of lines to skip before displaying. Useful for scrolling text.
</description>
</method>
<method name="set_max_lines_visible">
<return type="void">
</return>
<argument index="0" name="lines_visible" type="int">
</argument>
<description>
Restricts the number of lines to display. Set to -1 to disable.
</description>
</method>
<method name="set_percent_visible">
<return type="void">
</return>
<argument index="0" name="percent_visible" type="float">
</argument>
<description>
Restricts the number of characters to display (as a percentage of the total text).
</description>
</method>
<method name="set_text">
<return type="void">
</return>
<argument index="0" name="text" type="String">
</argument>
<description>
Set the label text. Text can contain newlines.
</description>
</method>
<method name="set_uppercase">
<return type="void">
</return>
<argument index="0" name="enable" type="bool">
</argument>
<description>
Display text in all capitals.
</description>
</method>
<method name="set_valign">
<return type="void">
</return>
<argument index="0" name="valign" type="int" enum="Label.VAlign">
</argument>
<description>
Sets the vertical alignment mode to any of the VALIGN_* enumeration values.
</description>
</method>
<method name="set_visible_characters">
<return type="void">
</return>
<argument index="0" name="amount" type="int">
</argument>
<description>
Restricts the number of characters to display. Set to -1 to disable.
</description>
</method>
</methods>
<members>
<member name="align" type="int" setter="set_align" getter="get_align" brief="" enum="Label.Align">
</member>
<member name="autowrap" type="bool" setter="set_autowrap" getter="has_autowrap" brief="">
</member>
<member name="clip_text" type="bool" setter="set_clip_text" getter="is_clipping_text" brief="">
</member>
<member name="lines_skipped" type="int" setter="set_lines_skipped" getter="get_lines_skipped" brief="">
</member>
<member name="max_lines_visible" type="int" setter="set_max_lines_visible" getter="get_max_lines_visible" brief="">
</member>
<member name="percent_visible" type="float" setter="set_percent_visible" getter="get_percent_visible" brief="">
</member>
<member name="text" type="String" setter="set_text" getter="get_text" brief="">
</member>
<member name="uppercase" type="bool" setter="set_uppercase" getter="is_uppercase" brief="">
</member>
<member name="valign" type="int" setter="set_valign" getter="get_valign" brief="" enum="Label.VAlign">
</member>
</members>
<constants>
<constant name="ALIGN_LEFT" value="0">
Align rows to the left (default).
</constant>
<constant name="ALIGN_CENTER" value="1">
Align rows centered.
</constant>
<constant name="ALIGN_RIGHT" value="2">
Align rows to the right (default).
</constant>
<constant name="ALIGN_FILL" value="3">
Expand row whitespaces to fit the width.
</constant>
<constant name="VALIGN_TOP" value="0">
Align the whole text to the top.
</constant>
<constant name="VALIGN_CENTER" value="1">
Align the whole text to the center.
</constant>
<constant name="VALIGN_BOTTOM" value="2">
Align the whole text to the bottom.
</constant>
<constant name="VALIGN_FILL" value="3">
Align the whole text by spreading the rows.
</constant>
</constants>
<theme_items>
<theme_item name="font" type="Font">
</theme_item>
<theme_item name="font_color" type="Color">
</theme_item>
<theme_item name="font_color_shadow" type="Color">
</theme_item>
<theme_item name="line_spacing" type="int">
</theme_item>
<theme_item name="normal" type="StyleBox">
</theme_item>
<theme_item name="shadow_as_outline" type="int">
</theme_item>
<theme_item name="shadow_offset_x" type="int">
</theme_item>
<theme_item name="shadow_offset_y" type="int">
</theme_item>
</theme_items>
</class>
|