Debian Codegraph @

doc/classes/RichTextLabel.xml

raw symbols SCIP
1 <?xml version="1.0" encoding="UTF-8" ?>
2 <class name="RichTextLabel" inherits="Control" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
3 <brief_description>
4 A control for displaying text that can contain different font styles, images, and basic formatting.
5 </brief_description>
6 <description>
7 A control for displaying text that can contain custom fonts, images, and basic formatting. [RichTextLabel] manages these as an internal tag stack. It also adapts itself to given width/heights.
8 [b]Note:[/b] [method newline], [method push_paragraph], [code]"\n"[/code], [code]"\r\n"[/code], [code]p[/code] tag, and alignment tags start a new paragraph. Each paragraph is processed independently, in its own BiDi context. If you want to force line wrapping within paragraph, any other line breaking character can be used, for example, Form Feed (U+000C), Next Line (U+0085), Line Separator (U+2028).
9 [b]Note:[/b] Assignments to [member text] clear the tag stack and reconstruct it from the property's contents. Any edits made to [member text] will erase previous edits made from other manual sources such as [method append_text] and the [code]push_*[/code] / [method pop] methods.
10 [b]Note:[/b] RichTextLabel doesn't support entangled BBCode tags. For example, instead of using [code skip-lint][b]bold[i]bold italic[/b]italic[/i][/code], use [code skip-lint][b]bold[i]bold italic[/i][/b][i]italic[/i][/code].
11 [b]Note:[/b] [code]push_*/pop_*[/code] functions won't affect BBCode.
12 [b]Note:[/b] While [member bbcode_enabled] is enabled, alignment tags such as [code skip-lint][center][/code] will take priority over the [member horizontal_alignment] setting which determines the default text alignment.
13 </description>
14 <tutorials>
15 <link title="BBCode in RichTextLabel">$DOCS_URL/tutorials/ui/bbcode_in_richtextlabel.html</link>
16 <link title="Rich Text Label with BBCode Demo">https://godotengine.org/asset-library/asset/2774</link>
17 <link title="Operating System Testing Demo">https://godotengine.org/asset-library/asset/2789</link>
18 </tutorials>
19 <methods>
20 <method name="add_hr">
21 <return type="void" />
22 <param index="0" name="width" type="int" default="90" />
23 <param index="1" name="height" type="int" default="2" />
24 <param index="2" name="color" type="Color" default="Color(1, 1, 1, 1)" />
25 <param index="3" name="alignment" type="int" enum="HorizontalAlignment" default="1" />
26 <param index="4" name="width_in_percent" type="bool" default="true" />
27 <param index="5" name="height_in_percent" type="bool" default="false" />
28 <description>
29 Adds a horizontal rule that can be used to separate content.
30 If [param width_in_percent] is set, [param width] values are percentages of the control width instead of pixels.
31 If [param height_in_percent] is set, [param height] values are percentages of the control width instead of pixels.
32 </description>
33 </method>
34 <method name="add_image">
35 <return type="void" />
36 <param index="0" name="image" type="Texture2D" />
37 <param index="1" name="width" type="int" default="0" />
38 <param index="2" name="height" type="int" default="0" />
39 <param index="3" name="color" type="Color" default="Color(1, 1, 1, 1)" />
40 <param index="4" name="inline_align" type="int" enum="InlineAlignment" default="5" />
41 <param index="5" name="region" type="Rect2" default="Rect2(0, 0, 0, 0)" />
42 <param index="6" name="key" type="Variant" default="null" />
43 <param index="7" name="pad" type="bool" default="false" />
44 <param index="8" name="tooltip" type="String" default="&quot;&quot;" />
45 <param index="9" name="width_in_percent" type="bool" default="false" />
46 <param index="10" name="height_in_percent" type="bool" default="false" />
47 <param index="11" name="alt_text" type="String" default="&quot;&quot;" />
48 <description>
49 Adds an image's opening and closing tags to the tag stack, optionally providing a [param width] and [param height] to resize the image, a [param color] to tint the image and a [param region] to only use parts of the image.
50 If [param width] or [param height] is set to 0, the image size will be adjusted in order to keep the original aspect ratio.
51 If [param width] and [param height] are not set, but [param region] is, the region's rect will be used.
52 [param key] is an optional identifier, that can be used to modify the image via [method update_image].
53 If [param pad] is set, and the image is smaller than the size specified by [param width] and [param height], the image padding is added to match the size instead of upscaling.
54 If [param width_in_percent] is set, [param width] values are percentages of the control width instead of pixels.
55 If [param height_in_percent] is set, [param height] values are percentages of the control width instead of pixels.
56 [param alt_text] is used as the image description for assistive apps.
57 </description>
58 </method>
59 <method name="add_text">
60 <return type="void" />
61 <param index="0" name="text" type="String" />
62 <description>
63 Adds raw non-BBCode-parsed text to the tag stack.
64 </description>
65 </method>
66 <method name="append_text">
67 <return type="void" />
68 <param index="0" name="bbcode" type="String" />
69 <description>
70 Parses [param bbcode] and adds tags to the tag stack as needed.
71 [b]Note:[/b] Using this method, you can't close a tag that was opened in a previous [method append_text] call. This is done to improve performance, especially when updating large RichTextLabels since rebuilding the whole BBCode every time would be slower. If you absolutely need to close a tag in a future method call, append the [member text] instead of using [method append_text].
72 </description>
73 </method>
74 <method name="clear">
75 <return type="void" />
76 <description>
77 Clears the tag stack, causing the label to display nothing.
78 [b]Note:[/b] This method does not affect [member text], and its contents will show again if the label is redrawn. However, setting [member text] to an empty [String] also clears the stack.
79 </description>
80 </method>
81 <method name="deselect">
82 <return type="void" />
83 <description>
84 Clears the current selection.
85 </description>
86 </method>
87 <method name="get_character_line">
88 <return type="int" />
89 <param index="0" name="character" type="int" />
90 <description>
91 Returns the line number of the character position provided. Line and character numbers are both zero-indexed.
92 [b]Note:[/b] If [member threaded] is enabled, this method returns a value for the loaded part of the document. Use [method is_finished] or [signal finished] to determine whether document is fully loaded.
93 </description>
94 </method>
95 <method name="get_character_paragraph">
96 <return type="int" />
97 <param index="0" name="character" type="int" />
98 <description>
99 Returns the paragraph number of the character position provided. Paragraph and character numbers are both zero-indexed.
100 [b]Note:[/b] If [member threaded] is enabled, this method returns a value for the loaded part of the document. Use [method is_finished] or [signal finished] to determine whether document is fully loaded.
101 </description>
102 </method>
103 <method name="get_content_height" qualifiers="const">
104 <return type="int" />
105 <description>
106 Returns the height of the content.
107 [b]Note:[/b] This method always returns the full content size, and is not affected by [member visible_ratio] and [member visible_characters]. To get the visible content size, use [method get_visible_content_rect].
108 [b]Note:[/b] If [member threaded] is enabled, this method returns a value for the loaded part of the document. Use [method is_finished] or [signal finished] to determine whether document is fully loaded.
109 </description>
110 </method>
111 <method name="get_content_width" qualifiers="const">
112 <return type="int" />
113 <description>
114 Returns the width of the content.
115 [b]Note:[/b] This method always returns the full content size, and is not affected by [member visible_ratio] and [member visible_characters]. To get the visible content size, use [method get_visible_content_rect].
116 [b]Note:[/b] If [member threaded] is enabled, this method returns a value for the loaded part of the document. Use [method is_finished] or [signal finished] to determine whether document is fully loaded.
117 </description>
118 </method>
119 <method name="get_line_count" qualifiers="const">
120 <return type="int" />
121 <description>
122 Returns the total number of lines in the text. Wrapped text is counted as multiple lines.
123 [b]Note:[/b] If [member threaded] is enabled, this method returns a value for the loaded part of the document. Use [method is_finished] or [signal finished] to determine whether document is fully loaded.
124 </description>
125 </method>
126 <method name="get_line_height" qualifiers="const">
127 <return type="int" />
128 <param index="0" name="line" type="int" />
129 <description>
130 Returns the height of the line found at the provided index.
131 [b]Note:[/b] If [member threaded] is enabled, this method returns a value for the loaded part of the document. Use [method is_finished] or [signal finished] to determine whether the document is fully loaded.
132 </description>
133 </method>
134 <method name="get_line_offset">
135 <return type="float" />
136 <param index="0" name="line" type="int" />
137 <description>
138 Returns the vertical offset of the line found at the provided index.
139 [b]Note:[/b] If [member threaded] is enabled, this method returns a value for the loaded part of the document. Use [method is_finished] or [signal finished] to determine whether document is fully loaded.
140 </description>
141 </method>
142 <method name="get_line_range">
143 <return type="Vector2i" />
144 <param index="0" name="line" type="int" />
145 <description>
146 Returns the indexes of the first and last visible characters for the given [param line], as a [Vector2i].
147 [b]Note:[/b] If [member visible_characters_behavior] is set to [constant TextServer.VC_CHARS_BEFORE_SHAPING] only visible wrapped lines are counted.
148 [b]Note:[/b] If [member threaded] is enabled, this method returns a value for the loaded part of the document. Use [method is_finished] or [signal finished] to determine whether document is fully loaded.
149 </description>
150 </method>
151 <method name="get_line_width" qualifiers="const">
152 <return type="int" />
153 <param index="0" name="line" type="int" />
154 <description>
155 Returns the width of the line found at the provided index.
156 [b]Note:[/b] If [member threaded] is enabled, this method returns a value for the loaded part of the document. Use [method is_finished] or [signal finished] to determine whether the document is fully loaded.
157 </description>
158 </method>
159 <method name="get_menu" qualifiers="const">
160 <return type="PopupMenu" />
161 <description>
162 Returns the [PopupMenu] of this [RichTextLabel]. By default, this menu is displayed when right-clicking on the [RichTextLabel].
163 You can add custom menu items or remove standard ones. Make sure your IDs don't conflict with the standard ones (see [enum MenuItems]). For example:
164 [codeblocks]
165 [gdscript]
166 func _ready():
167 var menu = get_menu()
168 # Remove "Select All" item.
169 menu.remove_item(MENU_SELECT_ALL)
170 # Add custom items.
171 menu.add_separator()
172 menu.add_item("Duplicate Text", MENU_MAX + 1)
173 # Connect callback.
174 menu.id_pressed.connect(_on_item_pressed)
175
176 func _on_item_pressed(id):
177 if id == MENU_MAX + 1:
178 add_text("\n" + get_parsed_text())
179 [/gdscript]
180 [csharp]
181 public override void _Ready()
182 {
183 var menu = GetMenu();
184 // Remove "Select All" item.
185 menu.RemoveItem(RichTextLabel.MenuItems.SelectAll);
186 // Add custom items.
187 menu.AddSeparator();
188 menu.AddItem("Duplicate Text", RichTextLabel.MenuItems.Max + 1);
189 // Add event handler.
190 menu.IdPressed += OnItemPressed;
191 }
192
193 public void OnItemPressed(int id)
194 {
195 if (id == TextEdit.MenuItems.Max + 1)
196 {
197 AddText("\n" + GetParsedText());
198 }
199 }
200 [/csharp]
201 [/codeblocks]
202 [b]Warning:[/b] This is a required internal node, removing and freeing it may cause a crash. If you wish to hide it or any of its children, use their [member Window.visible] property.
203 </description>
204 </method>
205 <method name="get_paragraph_count" qualifiers="const">
206 <return type="int" />
207 <description>
208 Returns the total number of paragraphs (newlines or [code]p[/code] tags in the tag stack's text tags). Considers wrapped text as one paragraph.
209 </description>
210 </method>
211 <method name="get_paragraph_offset">
212 <return type="float" />
213 <param index="0" name="paragraph" type="int" />
214 <description>
215 Returns the vertical offset of the paragraph found at the provided index.
216 [b]Note:[/b] If [member threaded] is enabled, this method returns a value for the loaded part of the document. Use [method is_finished] or [signal finished] to determine whether document is fully loaded.
217 </description>
218 </method>
219 <method name="get_parsed_text" qualifiers="const">
220 <return type="String" />
221 <description>
222 Returns the text without BBCode mark-up.
223 </description>
224 </method>
225 <method name="get_selected_text" qualifiers="const">
226 <return type="String" />
227 <description>
228 Returns the current selection text. Does not include BBCodes.
229 </description>
230 </method>
231 <method name="get_selection_from" qualifiers="const">
232 <return type="int" />
233 <description>
234 Returns the current selection first character index if a selection is active, [code]-1[/code] otherwise. Does not include BBCodes.
235 </description>
236 </method>
237 <method name="get_selection_line_offset" qualifiers="const">
238 <return type="float" />
239 <description>
240 Returns the current selection vertical line offset if a selection is active, [code]-1.0[/code] otherwise.
241 </description>
242 </method>
243 <method name="get_selection_to" qualifiers="const">
244 <return type="int" />
245 <description>
246 Returns the current selection last character index if a selection is active, [code]-1[/code] otherwise. Does not include BBCodes.
247 </description>
248 </method>
249 <method name="get_total_character_count" qualifiers="const">
250 <return type="int" />
251 <description>
252 Returns the total number of characters from text tags. Does not include BBCodes.
253 </description>
254 </method>
255 <method name="get_v_scroll_bar">
256 <return type="VScrollBar" />
257 <description>
258 Returns the vertical scrollbar.
259 [b]Warning:[/b] This is a required internal node, removing and freeing it may cause a crash. If you wish to hide it or any of its children, use their [member CanvasItem.visible] property.
260 </description>
261 </method>
262 <method name="get_visible_content_rect" qualifiers="const">
263 <return type="Rect2i" />
264 <description>
265 Returns the bounding rectangle of the visible content.
266 [b]Note:[/b] This method returns a correct value only after the label has been drawn.
267 [codeblocks]
268 [gdscript]
269 extends RichTextLabel
270
271 @export var background_panel: Panel
272
273 func _ready():
274 await draw
275 background_panel.position = get_visible_content_rect().position
276 background_panel.size = get_visible_content_rect().size
277 [/gdscript]
278 [csharp]
279 public partial class TestLabel : RichTextLabel
280 {
281 [Export]
282 public Panel BackgroundPanel { get; set; }
283
284 public override async void _Ready()
285 {
286 await ToSignal(this, Control.SignalName.Draw);
287 BackgroundGPanel.Position = GetVisibleContentRect().Position;
288 BackgroundPanel.Size = GetVisibleContentRect().Size;
289 }
290 }
291 [/csharp]
292 [/codeblocks]
293 </description>
294 </method>
295 <method name="get_visible_line_count" qualifiers="const">
296 <return type="int" />
297 <description>
298 Returns the number of visible lines.
299 [b]Note:[/b] This method returns a correct value only after the label has been drawn.
300 [b]Note:[/b] If [member threaded] is enabled, this method returns a value for the loaded part of the document. Use [method is_finished] or [signal finished] to determine whether document is fully loaded.
301 </description>
302 </method>
303 <method name="get_visible_paragraph_count" qualifiers="const">
304 <return type="int" />
305 <description>
306 Returns the number of visible paragraphs. A paragraph is considered visible if at least one of its lines is visible.
307 [b]Note:[/b] This method returns a correct value only after the label has been drawn.
308 [b]Note:[/b] If [member threaded] is enabled, this method returns a value for the loaded part of the document. Use [method is_finished] or [signal finished] to determine whether document is fully loaded.
309 </description>
310 </method>
311 <method name="install_effect">
312 <return type="void" />
313 <param index="0" name="effect" type="Variant" />
314 <description>
315 Installs a custom effect. This can also be done in the Inspector through the [member custom_effects] property. [param effect] should be a valid [RichTextEffect].
316 [b]Example:[/b] With the following script extending from [RichTextEffect]:
317 [codeblock]
318 # effect.gd
319 class_name MyCustomEffect
320 extends RichTextEffect
321
322 var bbcode = "my_custom_effect"
323
324 # ...
325 [/codeblock]
326 The above effect can be installed in [RichTextLabel] from a script:
327 [codeblock]
328 # rich_text_label.gd
329 extends RichTextLabel
330
331 func _ready():
332 install_effect(MyCustomEffect.new())
333
334 # Alternatively, if not using `class_name` in the script that extends RichTextEffect:
335 install_effect(preload("res://effect.gd").new())
336 [/codeblock]
337 </description>
338 </method>
339 <method name="invalidate_paragraph">
340 <return type="bool" />
341 <param index="0" name="paragraph" type="int" />
342 <description>
343 Invalidates [param paragraph] and all subsequent paragraphs cache.
344 </description>
345 </method>
346 <method name="is_finished" qualifiers="const">
347 <return type="bool" />
348 <description>
349 If [member threaded] is enabled, returns [code]true[/code] if the background thread has finished text processing, otherwise always return [code]true[/code].
350 </description>
351 </method>
352 <method name="is_menu_visible" qualifiers="const">
353 <return type="bool" />
354 <description>
355 Returns whether the menu is visible. Use this instead of [code]get_menu().visible[/code] to improve performance (so the creation of the menu is avoided).
356 </description>
357 </method>
358 <method name="is_ready" qualifiers="const" deprecated="Use [method is_finished] instead.">
359 <return type="bool" />
360 <description>
361 If [member threaded] is enabled, returns [code]true[/code] if the background thread has finished text processing, otherwise always return [code]true[/code].
362 </description>
363 </method>
364 <method name="menu_option">
365 <return type="void" />
366 <param index="0" name="option" type="int" />
367 <description>
368 Executes a given action as defined in the [enum MenuItems] enum.
369 </description>
370 </method>
371 <method name="newline">
372 <return type="void" />
373 <description>
374 Adds a newline tag to the tag stack.
375 </description>
376 </method>
377 <method name="parse_bbcode">
378 <return type="void" />
379 <param index="0" name="bbcode" type="String" />
380 <description>
381 The assignment version of [method append_text]. Clears the tag stack and inserts the new content.
382 </description>
383 </method>
384 <method name="parse_expressions_for_values">
385 <return type="Dictionary" />
386 <param index="0" name="expressions" type="PackedStringArray" />
387 <description>
388 Parses BBCode parameter [param expressions] into a dictionary.
389 </description>
390 </method>
391 <method name="pop">
392 <return type="void" />
393 <description>
394 Terminates the current tag. Use after [code]push_*[/code] methods to close BBCodes manually. Does not need to follow [code]add_*[/code] methods.
395 </description>
396 </method>
397 <method name="pop_all">
398 <return type="void" />
399 <description>
400 Terminates all tags opened by [code]push_*[/code] methods.
401 </description>
402 </method>
403 <method name="pop_context">
404 <return type="void" />
405 <description>
406 Terminates tags opened after the last [method push_context] call (including context marker), or all tags if there's no context marker on the stack.
407 </description>
408 </method>
409 <method name="push_bgcolor">
410 <return type="void" />
411 <param index="0" name="bgcolor" type="Color" />
412 <description>
413 Adds a [code skip-lint][bgcolor][/code] tag to the tag stack.
414 [b]Note:[/b] The background color has padding applied by default, which is controlled using [theme_item text_highlight_h_padding] and [theme_item text_highlight_v_padding]. This can lead to overlapping highlights if background colors are placed on neighboring lines/columns, so consider setting those theme items to [code]0[/code] if you want to avoid this.
415 </description>
416 </method>
417 <method name="push_bold">
418 <return type="void" />
419 <description>
420 Adds a [code skip-lint][font][/code] tag with a bold font to the tag stack. This is the same as adding a [code skip-lint][b][/code] tag if not currently in a [code skip-lint][i][/code] tag.
421 </description>
422 </method>
423 <method name="push_bold_italics">
424 <return type="void" />
425 <description>
426 Adds a [code skip-lint][font][/code] tag with a bold italics font to the tag stack.
427 </description>
428 </method>
429 <method name="push_cell">
430 <return type="void" />
431 <description>
432 Adds a [code skip-lint][cell][/code] tag to the tag stack. Must be inside a [code skip-lint][table][/code] tag. See [method push_table] for details. Use [method set_table_column_expand] to set column expansion ratio, [method set_cell_border_color] to set cell border, [method set_cell_row_background_color] to set cell background, [method set_cell_size_override] to override cell size, and [method set_cell_padding] to set padding.
433 </description>
434 </method>
435 <method name="push_color">
436 <return type="void" />
437 <param index="0" name="color" type="Color" />
438 <description>
439 Adds a [code skip-lint][color][/code] tag to the tag stack.
440 </description>
441 </method>
442 <method name="push_context">
443 <return type="void" />
444 <description>
445 Adds a context marker to the tag stack. See [method pop_context].
446 </description>
447 </method>
448 <method name="push_customfx">
449 <return type="void" />
450 <param index="0" name="effect" type="RichTextEffect" />
451 <param index="1" name="env" type="Dictionary" />
452 <description>
453 Adds a custom effect tag to the tag stack. The effect does not need to be in [member custom_effects]. The environment is directly passed to the effect.
454 </description>
455 </method>
456 <method name="push_dropcap">
457 <return type="void" />
458 <param index="0" name="string" type="String" />
459 <param index="1" name="font" type="Font" />
460 <param index="2" name="size" type="int" />
461 <param index="3" name="dropcap_margins" type="Rect2" default="Rect2(0, 0, 0, 0)" />
462 <param index="4" name="color" type="Color" default="Color(1, 1, 1, 1)" />
463 <param index="5" name="outline_size" type="int" default="0" />
464 <param index="6" name="outline_color" type="Color" default="Color(0, 0, 0, 0)" />
465 <description>
466 Adds a [code skip-lint][dropcap][/code] tag to the tag stack. Drop cap (dropped capital) is a decorative element at the beginning of a paragraph that is larger than the rest of the text.
467 </description>
468 </method>
469 <method name="push_fgcolor">
470 <return type="void" />
471 <param index="0" name="fgcolor" type="Color" />
472 <description>
473 Adds a [code skip-lint][fgcolor][/code] tag to the tag stack.
474 [b]Note:[/b] The foreground color has padding applied by default, which is controlled using [theme_item text_highlight_h_padding] and [theme_item text_highlight_v_padding]. This can lead to overlapping highlights if foreground colors are placed on neighboring lines/columns, so consider setting those theme items to [code]0[/code] if you want to avoid this.
475 </description>
476 </method>
477 <method name="push_font">
478 <return type="void" />
479 <param index="0" name="font" type="Font" />
480 <param index="1" name="font_size" type="int" default="0" />
481 <description>
482 Adds a [code skip-lint][font][/code] tag to the tag stack. Overrides default fonts for its duration.
483 Passing [code]0[/code] to [param font_size] will use the existing default font size.
484 </description>
485 </method>
486 <method name="push_font_size">
487 <return type="void" />
488 <param index="0" name="font_size" type="int" />
489 <description>
490 Adds a [code skip-lint][font_size][/code] tag to the tag stack. Overrides default font size for its duration.
491 </description>
492 </method>
493 <method name="push_hint">
494 <return type="void" />
495 <param index="0" name="description" type="String" />
496 <description>
497 Adds a [code skip-lint][hint][/code] tag to the tag stack. Same as BBCode [code skip-lint][hint=something]{text}[/hint][/code].
498 </description>
499 </method>
500 <method name="push_indent">
501 <return type="void" />
502 <param index="0" name="level" type="int" />
503 <description>
504 Adds an [code skip-lint][indent][/code] tag to the tag stack. Multiplies [param level] by current [member tab_size] to determine new margin length.
505 </description>
506 </method>
507 <method name="push_italics">
508 <return type="void" />
509 <description>
510 Adds a [code skip-lint][font][/code] tag with an italics font to the tag stack. This is the same as adding an [code skip-lint][i][/code] tag if not currently in a [code skip-lint][b][/code] tag.
511 </description>
512 </method>
513 <method name="push_language">
514 <return type="void" />
515 <param index="0" name="language" type="String" />
516 <description>
517 Adds language code used for text shaping algorithm and Open-Type font features.
518 </description>
519 </method>
520 <method name="push_list">
521 <return type="void" />
522 <param index="0" name="level" type="int" />
523 <param index="1" name="type" type="int" enum="RichTextLabel.ListType" />
524 <param index="2" name="capitalize" type="bool" />
525 <param index="3" name="bullet" type="String" default="&quot;•&quot;" />
526 <description>
527 Adds [code skip-lint][ol][/code] or [code skip-lint][ul][/code] tag to the tag stack. Multiplies [param level] by current [member tab_size] to determine new margin length.
528 </description>
529 </method>
530 <method name="push_meta" keywords="push_url">
531 <return type="void" />
532 <param index="0" name="data" type="Variant" />
533 <param index="1" name="underline_mode" type="int" enum="RichTextLabel.MetaUnderline" default="1" />
534 <param index="2" name="tooltip" type="String" default="&quot;&quot;" />
535 <description>
536 Adds a meta tag to the tag stack. Similar to the BBCode [code skip-lint][url=something]{text}[/url][/code], but supports non-[String] metadata types.
537 If [member meta_underlined] is [code]true[/code], meta tags display an underline. This behavior can be customized with [param underline_mode].
538 [b]Note:[/b] Meta tags do nothing by default when clicked. To assign behavior when clicked, connect [signal meta_clicked] to a function that is called when the meta tag is clicked.
539 </description>
540 </method>
541 <method name="push_mono">
542 <return type="void" />
543 <description>
544 Adds a [code skip-lint][font][/code] tag with a monospace font to the tag stack.
545 </description>
546 </method>
547 <method name="push_normal">
548 <return type="void" />
549 <description>
550 Adds a [code skip-lint][font][/code] tag with a normal font to the tag stack.
551 </description>
552 </method>
553 <method name="push_outline_color">
554 <return type="void" />
555 <param index="0" name="color" type="Color" />
556 <description>
557 Adds a [code skip-lint][outline_color][/code] tag to the tag stack. Adds text outline for its duration.
558 </description>
559 </method>
560 <method name="push_outline_size">
561 <return type="void" />
562 <param index="0" name="outline_size" type="int" />
563 <description>
564 Adds a [code skip-lint][outline_size][/code] tag to the tag stack. Overrides default text outline size for its duration.
565 </description>
566 </method>
567 <method name="push_paragraph">
568 <return type="void" />
569 <param index="0" name="alignment" type="int" enum="HorizontalAlignment" />
570 <param index="1" name="base_direction" type="int" enum="Control.TextDirection" default="0" />
571 <param index="2" name="language" type="String" default="&quot;&quot;" />
572 <param index="3" name="st_parser" type="int" enum="TextServer.StructuredTextParser" default="0" />
573 <param index="4" name="justification_flags" type="int" enum="TextServer.JustificationFlag" is_bitfield="true" default="163" />
574 <param index="5" name="tab_stops" type="PackedFloat32Array" default="PackedFloat32Array()" />
575 <description>
576 Adds a [code skip-lint][p][/code] tag to the tag stack.
577 </description>
578 </method>
579 <method name="push_strikethrough">
580 <return type="void" />
581 <param index="0" name="color" type="Color" default="Color(0, 0, 0, 0)" />
582 <description>
583 Adds a [code skip-lint][s][/code] tag to the tag stack. If [param color]'s alpha value is [code]0.0[/code], the current font's color with its alpha multiplied by [theme_item strikethrough_alpha] is used.
584 </description>
585 </method>
586 <method name="push_table">
587 <return type="void" />
588 <param index="0" name="columns" type="int" />
589 <param index="1" name="inline_align" type="int" enum="InlineAlignment" default="0" />
590 <param index="2" name="align_to_row" type="int" default="-1" />
591 <param index="3" name="name" type="String" default="&quot;&quot;" />
592 <description>
593 Adds a [code skip-lint][table=columns,inline_align][/code] tag to the tag stack. Use [method set_table_column_expand] to set column expansion ratio. Use [method push_cell] to add cells. [param name] is used as the table name for assistive apps.
594 </description>
595 </method>
596 <method name="push_underline">
597 <return type="void" />
598 <param index="0" name="color" type="Color" default="Color(0, 0, 0, 0)" />
599 <description>
600 Adds a [code skip-lint][u][/code] tag to the tag stack. If [param color]'s alpha value is [code]0.0[/code], the current font's color with its alpha multiplied by [theme_item underline_alpha] is used.
601 </description>
602 </method>
603 <method name="reload_effects">
604 <return type="void" />
605 <description>
606 Reloads custom effects. Useful when [member custom_effects] is modified manually.
607 </description>
608 </method>
609 <method name="remove_paragraph">
610 <return type="bool" />
611 <param index="0" name="paragraph" type="int" />
612 <param index="1" name="no_invalidate" type="bool" default="false" />
613 <description>
614 Removes a paragraph of content from the label. Returns [code]true[/code] if the paragraph exists.
615 The [param paragraph] argument is the index of the paragraph to remove, it can take values in the interval [code][0, get_paragraph_count() - 1][/code].
616 If [param no_invalidate] is set to [code]true[/code], cache for the subsequent paragraphs is not invalidated. Use it for faster updates if deleted paragraph is fully self-contained (have no unclosed tags), or this call is part of the complex edit operation and [method invalidate_paragraph] will be called at the end of operation.
617 </description>
618 </method>
619 <method name="scroll_to_line">
620 <return type="void" />
621 <param index="0" name="line" type="int" />
622 <description>
623 Scrolls the window's top line to match [param line].
624 </description>
625 </method>
626 <method name="scroll_to_paragraph">
627 <return type="void" />
628 <param index="0" name="paragraph" type="int" />
629 <description>
630 Scrolls the window's top line to match first line of the [param paragraph].
631 </description>
632 </method>
633 <method name="scroll_to_selection">
634 <return type="void" />
635 <description>
636 Scrolls to the beginning of the current selection.
637 </description>
638 </method>
639 <method name="select_all">
640 <return type="void" />
641 <description>
642 Select all the text.
643 If [member selection_enabled] is [code]false[/code], no selection will occur.
644 </description>
645 </method>
646 <method name="set_cell_border_color">
647 <return type="void" />
648 <param index="0" name="color" type="Color" />
649 <description>
650 Sets color of a table cell border.
651 </description>
652 </method>
653 <method name="set_cell_padding">
654 <return type="void" />
655 <param index="0" name="padding" type="Rect2" />
656 <description>
657 Sets inner padding of a table cell.
658 </description>
659 </method>
660 <method name="set_cell_row_background_color">
661 <return type="void" />
662 <param index="0" name="odd_row_bg" type="Color" />
663 <param index="1" name="even_row_bg" type="Color" />
664 <description>
665 Sets color of a table cell. Separate colors for alternating rows can be specified.
666 </description>
667 </method>
668 <method name="set_cell_size_override">
669 <return type="void" />
670 <param index="0" name="min_size" type="Vector2" />
671 <param index="1" name="max_size" type="Vector2" />
672 <description>
673 Sets minimum and maximum size overrides for a table cell.
674 </description>
675 </method>
676 <method name="set_table_column_expand">
677 <return type="void" />
678 <param index="0" name="column" type="int" />
679 <param index="1" name="expand" type="bool" />
680 <param index="2" name="ratio" type="int" default="1" />
681 <param index="3" name="shrink" type="bool" default="true" />
682 <description>
683 Edits the selected column's expansion options. If [param expand] is [code]true[/code], the column expands in proportion to its expansion ratio versus the other columns' ratios.
684 For example, 2 columns with ratios 3 and 4 plus 70 pixels in available width would expand 30 and 40 pixels, respectively.
685 If [param expand] is [code]false[/code], the column will not contribute to the total ratio.
686 </description>
687 </method>
688 <method name="set_table_column_name">
689 <return type="void" />
690 <param index="0" name="column" type="int" />
691 <param index="1" name="name" type="String" />
692 <description>
693 Sets table column name for assistive apps.
694 </description>
695 </method>
696 <method name="update_image">
697 <return type="void" />
698 <param index="0" name="key" type="Variant" />
699 <param index="1" name="mask" type="int" enum="RichTextLabel.ImageUpdateMask" is_bitfield="true" />
700 <param index="2" name="image" type="Texture2D" />
701 <param index="3" name="width" type="int" default="0" />
702 <param index="4" name="height" type="int" default="0" />
703 <param index="5" name="color" type="Color" default="Color(1, 1, 1, 1)" />
704 <param index="6" name="inline_align" type="int" enum="InlineAlignment" default="5" />
705 <param index="7" name="region" type="Rect2" default="Rect2(0, 0, 0, 0)" />
706 <param index="8" name="pad" type="bool" default="false" />
707 <param index="9" name="tooltip" type="String" default="&quot;&quot;" />
708 <param index="10" name="width_in_percent" type="bool" default="false" />
709 <param index="11" name="height_in_percent" type="bool" default="false" />
710 <description>
711 Updates the existing images with the key [param key]. Only properties specified by [param mask] bits are updated. See [method add_image].
712 </description>
713 </method>
714 </methods>
715 <members>
716 <member name="autowrap_mode" type="int" setter="set_autowrap_mode" getter="get_autowrap_mode" enum="TextServer.AutowrapMode" default="3">
717 If set to something other than [constant TextServer.AUTOWRAP_OFF], the text gets wrapped inside the node's bounding rectangle.
718 </member>
719 <member name="autowrap_trim_flags" type="int" setter="set_autowrap_trim_flags" getter="get_autowrap_trim_flags" enum="TextServer.LineBreakFlag" is_bitfield="true" default="192">
720 Autowrap space trimming flags. See [constant TextServer.BREAK_TRIM_START_EDGE_SPACES] and [constant TextServer.BREAK_TRIM_END_EDGE_SPACES] for more info.
721 </member>
722 <member name="bbcode_enabled" type="bool" setter="set_use_bbcode" getter="is_using_bbcode" default="false">
723 If [code]true[/code], the label uses BBCode formatting.
724 [b]Note:[/b] This only affects the contents of [member text], not the tag stack.
725 </member>
726 <member name="clip_contents" type="bool" setter="set_clip_contents" getter="is_clipping_contents" overrides="Control" default="true" />
727 <member name="context_menu_enabled" type="bool" setter="set_context_menu_enabled" getter="is_context_menu_enabled" default="false">
728 If [code]true[/code], a right-click displays the context menu.
729 </member>
730 <member name="custom_effects" type="Array" setter="set_effects" getter="get_effects" default="[]">
731 The currently installed custom effects. This is an array of [RichTextEffect]s.
732 To add a custom effect, it's more convenient to use [method install_effect].
733 </member>
734 <member name="deselect_on_focus_loss_enabled" type="bool" setter="set_deselect_on_focus_loss_enabled" getter="is_deselect_on_focus_loss_enabled" default="true">
735 If [code]true[/code], the selected text will be deselected when focus is lost.
736 </member>
737 <member name="drag_and_drop_selection_enabled" type="bool" setter="set_drag_and_drop_selection_enabled" getter="is_drag_and_drop_selection_enabled" default="true">
738 If [code]true[/code], allow drag and drop of selected text.
739 </member>
740 <member name="fit_content" type="bool" setter="set_fit_content" getter="is_fit_content_enabled" default="false">
741 If [code]true[/code], the label's minimum size will be automatically updated to fit its content, matching the behavior of [Label].
742 </member>
743 <member name="focus_mode" type="int" setter="set_focus_mode" getter="get_focus_mode" overrides="Control" enum="Control.FocusMode" default="3" />
744 <member name="hint_underlined" type="bool" setter="set_hint_underline" getter="is_hint_underlined" default="true">
745 If [code]true[/code], the label underlines hint tags such as [code skip-lint][hint=description]{text}[/hint][/code].
746 </member>
747 <member name="horizontal_alignment" type="int" setter="set_horizontal_alignment" getter="get_horizontal_alignment" enum="HorizontalAlignment" default="0">
748 Controls the text's horizontal alignment. Supports left, center, right, and fill (also known as justify).
749 </member>
750 <member name="justification_flags" type="int" setter="set_justification_flags" getter="get_justification_flags" enum="TextServer.JustificationFlag" is_bitfield="true" default="163">
751 Line fill alignment rules.
752 </member>
753 <member name="language" type="String" setter="set_language" getter="get_language" default="&quot;&quot;">
754 Language code used for line-breaking and text shaping algorithms. If left empty, the current locale is used instead.
755 </member>
756 <member name="meta_underlined" type="bool" setter="set_meta_underline" getter="is_meta_underlined" default="true" keywords="url_underlined">
757 If [code]true[/code], the label underlines meta tags such as [code skip-lint][url]{text}[/url][/code]. These tags can call a function when clicked if [signal meta_clicked] is connected to a function.
758 </member>
759 <member name="progress_bar_delay" type="int" setter="set_progress_bar_delay" getter="get_progress_bar_delay" default="1000">
760 The delay after which the loading progress bar is displayed, in milliseconds. Set to [code]-1[/code] to disable progress bar entirely.
761 [b]Note:[/b] Progress bar is displayed only if [member threaded] is enabled.
762 </member>
763 <member name="scroll_active" type="bool" setter="set_scroll_active" getter="is_scroll_active" default="true">
764 If [code]true[/code], the scrollbar is visible. Setting this to [code]false[/code] does not block scrolling completely. See [method scroll_to_line].
765 </member>
766 <member name="scroll_following" type="bool" setter="set_scroll_follow" getter="is_scroll_following" default="false">
767 If [code]true[/code], the window scrolls down to display new content automatically.
768 </member>
769 <member name="scroll_following_visible_characters" type="bool" setter="set_scroll_follow_visible_characters" getter="is_scroll_following_visible_characters" default="false">
770 If [code]true[/code], the window scrolls to display the last visible line when [member visible_characters] or [member visible_ratio] is changed.
771 </member>
772 <member name="selection_enabled" type="bool" setter="set_selection_enabled" getter="is_selection_enabled" default="false">
773 If [code]true[/code], the label allows text selection.
774 </member>
775 <member name="shortcut_keys_enabled" type="bool" setter="set_shortcut_keys_enabled" getter="is_shortcut_keys_enabled" default="true">
776 If [code]true[/code], shortcut keys for context menu items are enabled, even if the context menu is disabled.
777 </member>
778 <member name="structured_text_bidi_override" type="int" setter="set_structured_text_bidi_override" getter="get_structured_text_bidi_override" enum="TextServer.StructuredTextParser" default="0">
779 Set BiDi algorithm override for the structured text.
780 </member>
781 <member name="structured_text_bidi_override_options" type="Array" setter="set_structured_text_bidi_override_options" getter="get_structured_text_bidi_override_options" default="[]">
782 Set additional options for BiDi override.
783 </member>
784 <member name="tab_size" type="int" setter="set_tab_size" getter="get_tab_size" default="4">
785 The number of spaces associated with a single tab length. Does not affect [code]\t[/code] in text tags, only indent tags.
786 </member>
787 <member name="tab_stops" type="PackedFloat32Array" setter="set_tab_stops" getter="get_tab_stops" default="PackedFloat32Array()">
788 Aligns text to the given tab-stops.
789 </member>
790 <member name="text" type="String" setter="set_text" getter="get_text" default="&quot;&quot;">
791 The label's text in BBCode format. Is not representative of manual modifications to the internal tag stack. Erases changes made by other methods when edited.
792 [b]Note:[/b] If [member bbcode_enabled] is [code]true[/code], it is unadvised to use the [code]+=[/code] operator with [member text] (e.g. [code]text += "some string"[/code]) as it replaces the whole text and can cause slowdowns. It will also erase all BBCode that was added to stack using [code]push_*[/code] methods. Use [method append_text] for adding text instead, unless you absolutely need to close a tag that was opened in an earlier method call.
793 </member>
794 <member name="text_direction" type="int" setter="set_text_direction" getter="get_text_direction" enum="Control.TextDirection" default="0">
795 Base text writing direction.
796 </member>
797 <member name="threaded" type="bool" setter="set_threaded" getter="is_threaded" default="false">
798 If [code]true[/code], text processing is done in a background thread.
799 </member>
800 <member name="vertical_alignment" type="int" setter="set_vertical_alignment" getter="get_vertical_alignment" enum="VerticalAlignment" default="0">
801 Controls the text's vertical alignment. Supports top, center, bottom, and fill.
802 </member>
803 <member name="visible_characters" type="int" setter="set_visible_characters" getter="get_visible_characters" default="-1">
804 The number of characters to display. If set to [code]-1[/code], all characters are displayed. This can be useful when animating the text appearing in a dialog box.
805 [b]Note:[/b] Setting this property updates [member visible_ratio] accordingly.
806 [b]Note:[/b] Characters are counted as Unicode codepoints. A single visible grapheme may contain multiple codepoints (e.g. certain emoji use three codepoints). A single codepoint may contain two UTF-16 characters, which are used in C# strings.
807 </member>
808 <member name="visible_characters_behavior" type="int" setter="set_visible_characters_behavior" getter="get_visible_characters_behavior" enum="TextServer.VisibleCharactersBehavior" default="0">
809 The clipping behavior when [member visible_characters] or [member visible_ratio] is set.
810 </member>
811 <member name="visible_ratio" type="float" setter="set_visible_ratio" getter="get_visible_ratio" default="1.0">
812 The fraction of characters to display, relative to the total number of characters (see [method get_total_character_count]). If set to [code]1.0[/code], all characters are displayed. If set to [code]0.5[/code], only half of the characters will be displayed. This can be useful when animating the text appearing in a dialog box.
813 [b]Note:[/b] Setting this property updates [member visible_characters] accordingly.
814 </member>
815 </members>
816 <signals>
817 <signal name="finished">
818 <description>
819 Triggered when the document is fully loaded.
820 [b]Note:[/b] This can happen before the text is processed for drawing. Scrolling values may not be valid until the document is drawn for the first time after this signal.
821 </description>
822 </signal>
823 <signal name="meta_clicked">
824 <param index="0" name="meta" type="Variant" />
825 <description>
826 Triggered when the user clicks on content between meta (URL) tags. If the meta is defined in BBCode, e.g. [code skip-lint][url={"key": "value"}]Text[/url][/code], then the parameter for this signal will always be a [String] type. If a particular type or an object is desired, the [method push_meta] method must be used to manually insert the data into the tag stack. Alternatively, you can convert the [String] input to the desired type based on its contents (such as calling [method JSON.parse] on it).
827 For example, the following method can be connected to [signal meta_clicked] to open clicked URLs using the user's default web browser:
828 [codeblocks]
829 [gdscript]
830 # This assumes RichTextLabel's `meta_clicked` signal was connected to
831 # the function below using the signal connection dialog.
832 func _richtextlabel_on_meta_clicked(meta):
833 # `meta` is of Variant type, so convert it to a String to avoid script errors at run-time.
834 OS.shell_open(str(meta))
835 [/gdscript]
836 [/codeblocks]
837 </description>
838 </signal>
839 <signal name="meta_hover_ended">
840 <param index="0" name="meta" type="Variant" />
841 <description>
842 Triggers when the mouse exits a meta tag.
843 </description>
844 </signal>
845 <signal name="meta_hover_started">
846 <param index="0" name="meta" type="Variant" />
847 <description>
848 Triggers when the mouse enters a meta tag.
849 </description>
850 </signal>
851 </signals>
852 <constants>
853 <constant name="LIST_NUMBERS" value="0" enum="ListType">
854 Each list item has a number marker.
855 </constant>
856 <constant name="LIST_LETTERS" value="1" enum="ListType">
857 Each list item has a letter marker.
858 </constant>
859 <constant name="LIST_ROMAN" value="2" enum="ListType">
860 Each list item has a roman number marker.
861 </constant>
862 <constant name="LIST_DOTS" value="3" enum="ListType">
863 Each list item has a filled circle marker.
864 </constant>
865 <constant name="MENU_COPY" value="0" enum="MenuItems">
866 Copies the selected text.
867 </constant>
868 <constant name="MENU_SELECT_ALL" value="1" enum="MenuItems">
869 Selects the whole [RichTextLabel] text.
870 </constant>
871 <constant name="MENU_MAX" value="2" enum="MenuItems">
872 Represents the size of the [enum MenuItems] enum.
873 </constant>
874 <constant name="META_UNDERLINE_NEVER" value="0" enum="MetaUnderline">
875 Meta tag does not display an underline, even if [member meta_underlined] is [code]true[/code].
876 </constant>
877 <constant name="META_UNDERLINE_ALWAYS" value="1" enum="MetaUnderline">
878 If [member meta_underlined] is [code]true[/code], meta tag always display an underline.
879 </constant>
880 <constant name="META_UNDERLINE_ON_HOVER" value="2" enum="MetaUnderline">
881 If [member meta_underlined] is [code]true[/code], meta tag display an underline when the mouse cursor is over it.
882 </constant>
883 <constant name="UPDATE_TEXTURE" value="1" enum="ImageUpdateMask" is_bitfield="true">
884 If this bit is set, [method update_image] changes image texture.
885 </constant>
886 <constant name="UPDATE_SIZE" value="2" enum="ImageUpdateMask" is_bitfield="true">
887 If this bit is set, [method update_image] changes image size.
888 </constant>
889 <constant name="UPDATE_COLOR" value="4" enum="ImageUpdateMask" is_bitfield="true">
890 If this bit is set, [method update_image] changes image color.
891 </constant>
892 <constant name="UPDATE_ALIGNMENT" value="8" enum="ImageUpdateMask" is_bitfield="true">
893 If this bit is set, [method update_image] changes image inline alignment.
894 </constant>
895 <constant name="UPDATE_REGION" value="16" enum="ImageUpdateMask" is_bitfield="true">
896 If this bit is set, [method update_image] changes image texture region.
897 </constant>
898 <constant name="UPDATE_PAD" value="32" enum="ImageUpdateMask" is_bitfield="true">
899 If this bit is set, [method update_image] changes image padding.
900 </constant>
901 <constant name="UPDATE_TOOLTIP" value="64" enum="ImageUpdateMask" is_bitfield="true">
902 If this bit is set, [method update_image] changes image tooltip.
903 </constant>
904 <constant name="UPDATE_WIDTH_IN_PERCENT" value="128" enum="ImageUpdateMask" is_bitfield="true">
905 If this bit is set, [method update_image] changes image width from/to percents.
906 </constant>
907 </constants>
908 <theme_items>
909 <theme_item name="default_color" data_type="color" type="Color" default="Color(1, 1, 1, 1)">
910 The default text color.
911 </theme_item>
912 <theme_item name="font_outline_color" data_type="color" type="Color" default="Color(0, 0, 0, 1)">
913 The default tint of text outline.
914 </theme_item>
915 <theme_item name="font_selected_color" data_type="color" type="Color" default="Color(0, 0, 0, 0)">
916 The color of selected text, used when [member selection_enabled] is [code]true[/code]. If equal to [code]Color(0, 0, 0, 0)[/code], it will be ignored.
917 </theme_item>
918 <theme_item name="font_shadow_color" data_type="color" type="Color" default="Color(0, 0, 0, 0)">
919 The color of the font's shadow.
920 </theme_item>
921 <theme_item name="selection_color" data_type="color" type="Color" default="Color(0.1, 0.1, 1, 0.8)">
922 The color of the selection box.
923 </theme_item>
924 <theme_item name="table_border" data_type="color" type="Color" default="Color(0, 0, 0, 0)">
925 The default cell border color.
926 </theme_item>
927 <theme_item name="table_even_row_bg" data_type="color" type="Color" default="Color(0, 0, 0, 0)">
928 The default background color for even rows.
929 </theme_item>
930 <theme_item name="table_odd_row_bg" data_type="color" type="Color" default="Color(0, 0, 0, 0)">
931 The default background color for odd rows.
932 </theme_item>
933 <theme_item name="line_separation" data_type="constant" type="int" default="0">
934 Additional vertical spacing between lines (in pixels), spacing is added to line descent. This value can be negative.
935 </theme_item>
936 <theme_item name="outline_size" data_type="constant" type="int" default="0">
937 The size of the text outline.
938 [b]Note:[/b] If using a font with [member FontFile.multichannel_signed_distance_field] enabled, its [member FontFile.msdf_pixel_range] must be set to at least [i]twice[/i] the value of [theme_item outline_size] for outline rendering to look correct. Otherwise, the outline may appear to be cut off earlier than intended.
939 </theme_item>
940 <theme_item name="paragraph_separation" data_type="constant" type="int" default="0">
941 Additional vertical spacing between paragraphs (in pixels). Spacing is added after the last line. This value can be negative.
942 </theme_item>
943 <theme_item name="shadow_offset_x" data_type="constant" type="int" default="1">
944 The horizontal offset of the font's shadow.
945 </theme_item>
946 <theme_item name="shadow_offset_y" data_type="constant" type="int" default="1">
947 The vertical offset of the font's shadow.
948 </theme_item>
949 <theme_item name="shadow_outline_size" data_type="constant" type="int" default="1">
950 The size of the shadow outline.
951 </theme_item>
952 <theme_item name="strikethrough_alpha" data_type="constant" type="int" default="50">
953 The default strikethrough color transparency (percent). For strikethroughs with a custom color, this theme item is only used if the custom color's alpha is [code]0.0[/code] (fully transparent).
954 </theme_item>
955 <theme_item name="table_h_separation" data_type="constant" type="int" default="3">
956 The horizontal separation of elements in a table.
957 </theme_item>
958 <theme_item name="table_v_separation" data_type="constant" type="int" default="3">
959 The vertical separation of elements in a table.
960 </theme_item>
961 <theme_item name="text_highlight_h_padding" data_type="constant" type="int" default="3">
962 The horizontal padding around boxes drawn by the [code][fgcolor][/code] and [code][bgcolor][/code] tags. This does not affect the appearance of text selection. To avoid any risk of neighboring highlights overlapping each other, set this to [code]0[/code] to disable padding.
963 </theme_item>
964 <theme_item name="text_highlight_v_padding" data_type="constant" type="int" default="3">
965 The vertical padding around boxes drawn by the [code][fgcolor][/code] and [code][bgcolor][/code] tags. This does not affect the appearance of text selection. To avoid any risk of neighboring highlights overlapping each other, set this to [code]0[/code] to disable padding.
966 </theme_item>
967 <theme_item name="underline_alpha" data_type="constant" type="int" default="50">
968 The default underline color transparency (percent). For underlines with a custom color, this theme item is only used if the custom color's alpha is [code]0.0[/code] (fully transparent).
969 </theme_item>
970 <theme_item name="bold_font" data_type="font" type="Font">
971 The font used for bold text.
972 </theme_item>
973 <theme_item name="bold_italics_font" data_type="font" type="Font">
974 The font used for bold italics text.
975 </theme_item>
976 <theme_item name="italics_font" data_type="font" type="Font">
977 The font used for italics text.
978 </theme_item>
979 <theme_item name="mono_font" data_type="font" type="Font">
980 The font used for monospace text.
981 </theme_item>
982 <theme_item name="normal_font" data_type="font" type="Font">
983 The default text font.
984 </theme_item>
985 <theme_item name="bold_font_size" data_type="font_size" type="int">
986 The font size used for bold text.
987 </theme_item>
988 <theme_item name="bold_italics_font_size" data_type="font_size" type="int">
989 The font size used for bold italics text.
990 </theme_item>
991 <theme_item name="italics_font_size" data_type="font_size" type="int">
992 The font size used for italics text.
993 </theme_item>
994 <theme_item name="mono_font_size" data_type="font_size" type="int">
995 The font size used for monospace text.
996 </theme_item>
997 <theme_item name="normal_font_size" data_type="font_size" type="int">
998 The default text font size.
999 </theme_item>
1000 <theme_item name="horizontal_rule" data_type="icon" type="Texture2D">
1001 The horizontal rule texture.
1002 </theme_item>
1003 <theme_item name="focus" data_type="style" type="StyleBox">
1004 The background used when the [RichTextLabel] is focused. The [theme_item focus] [StyleBox] is displayed [i]over[/i] the base [StyleBox], so a partially transparent [StyleBox] should be used to ensure the base [StyleBox] remains visible. A [StyleBox] that represents an outline or an underline works well for this purpose. To disable the focus visual effect, assign a [StyleBoxEmpty] resource. Note that disabling the focus visual effect will harm keyboard/controller navigation usability, so this is not recommended for accessibility reasons.
1005 </theme_item>
1006 <theme_item name="normal" data_type="style" type="StyleBox">
1007 The normal background for the [RichTextLabel].
1008 </theme_item>
1009 </theme_items>
1010 </class>