summaryrefslogtreecommitdiff
path: root/doc/classes/RichTextLabel.xml
diff options
context:
space:
mode:
Diffstat (limited to 'doc/classes/RichTextLabel.xml')
-rw-r--r--doc/classes/RichTextLabel.xml150
1 files changed, 75 insertions, 75 deletions
diff --git a/doc/classes/RichTextLabel.xml b/doc/classes/RichTextLabel.xml
index 8228bcc442..f4cbf4c442 100644
--- a/doc/classes/RichTextLabel.xml
+++ b/doc/classes/RichTextLabel.xml
@@ -18,28 +18,28 @@
<methods>
<method name="add_image">
<return type="void" />
- <argument index="0" name="image" type="Texture2D" />
- <argument index="1" name="width" type="int" default="0" />
- <argument index="2" name="height" type="int" default="0" />
- <argument index="3" name="color" type="Color" default="Color(1, 1, 1, 1)" />
- <argument index="4" name="inline_align" type="int" enum="InlineAlignment" default="5" />
+ <param index="0" name="image" type="Texture2D" />
+ <param index="1" name="width" type="int" default="0" />
+ <param index="2" name="height" type="int" default="0" />
+ <param index="3" name="color" type="Color" default="Color(1, 1, 1, 1)" />
+ <param index="4" name="inline_align" type="int" enum="InlineAlignment" default="5" />
<description>
- Adds an image's opening and closing tags to the tag stack, optionally providing a [code]width[/code] and [code]height[/code] to resize the image and a [code]color[/code] to tint the image.
- If [code]width[/code] or [code]height[/code] is set to 0, the image size will be adjusted in order to keep the original aspect ratio.
+ Adds an image's opening and closing tags to the tag stack, optionally providing a [param width] and [param height] to resize the image and a [param color] to tint the image.
+ If [param width] or [param height] is set to 0, the image size will be adjusted in order to keep the original aspect ratio.
</description>
</method>
<method name="add_text">
<return type="void" />
- <argument index="0" name="text" type="String" />
+ <param index="0" name="text" type="String" />
<description>
Adds raw non-BBCode-parsed text to the tag stack.
</description>
</method>
<method name="append_text">
<return type="void" />
- <argument index="0" name="bbcode" type="String" />
+ <param index="0" name="bbcode" type="String" />
<description>
- Parses [code]bbcode[/code] and adds tags to the tag stack as needed.
+ Parses [param bbcode] and adds tags to the tag stack as needed.
[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].
</description>
</method>
@@ -57,7 +57,7 @@
</method>
<method name="get_character_line">
<return type="int" />
- <argument index="0" name="character" type="int" />
+ <param index="0" name="character" type="int" />
<description>
Returns the line number of the character position provided.
[b]Note:[/b] If [member threaded] is enabled, this method returns a value for the loaded part of the document. Use [method is_ready] or [signal finished] to determine whether document is fully loaded.
@@ -65,7 +65,7 @@
</method>
<method name="get_character_paragraph">
<return type="int" />
- <argument index="0" name="character" type="int" />
+ <param index="0" name="character" type="int" />
<description>
Returns the paragraph number of the character position provided.
[b]Note:[/b] If [member threaded] is enabled, this method returns a value for the loaded part of the document. Use [method is_ready] or [signal finished] to determine whether document is fully loaded.
@@ -94,7 +94,7 @@
</method>
<method name="get_line_offset">
<return type="float" />
- <argument index="0" name="line" type="int" />
+ <param index="0" name="line" type="int" />
<description>
Returns the vertical offset of the line found at the provided index.
[b]Note:[/b] If [member threaded] is enabled, this method returns a value for the loaded part of the document. Use [method is_ready] or [signal finished] to determine whether document is fully loaded.
@@ -115,7 +115,7 @@
</method>
<method name="get_paragraph_offset">
<return type="float" />
- <argument index="0" name="paragraph" type="int" />
+ <param index="0" name="paragraph" type="int" />
<description>
Returns the vertical offset of the paragraph found at the provided index.
[b]Note:[/b] If [member threaded] is enabled, this method returns a value for the loaded part of the document. Use [method is_ready] or [signal finished] to determine whether document is fully loaded.
@@ -174,9 +174,9 @@
</method>
<method name="install_effect">
<return type="void" />
- <argument index="0" name="effect" type="Variant" />
+ <param index="0" name="effect" type="Variant" />
<description>
- Installs a custom effect. [code]effect[/code] should be a valid [RichTextEffect].
+ Installs a custom effect. [param effect] should be a valid [RichTextEffect].
</description>
</method>
<method name="is_menu_visible" qualifiers="const">
@@ -199,16 +199,16 @@
</method>
<method name="parse_bbcode">
<return type="void" />
- <argument index="0" name="bbcode" type="String" />
+ <param index="0" name="bbcode" type="String" />
<description>
The assignment version of [method append_text]. Clears the tag stack and inserts the new content.
</description>
</method>
<method name="parse_expressions_for_values">
<return type="Dictionary" />
- <argument index="0" name="expressions" type="PackedStringArray" />
+ <param index="0" name="expressions" type="PackedStringArray" />
<description>
- Parses BBCode parameter [code]expressions[/code] into a dictionary.
+ Parses BBCode parameter [param expressions] into a dictionary.
</description>
</method>
<method name="pop">
@@ -219,7 +219,7 @@
</method>
<method name="push_bgcolor">
<return type="void" />
- <argument index="0" name="bgcolor" type="Color" />
+ <param index="0" name="bgcolor" type="Color" />
<description>
Adds a [code][bgcolor][/code] tag to the tag stack.
</description>
@@ -244,57 +244,57 @@
</method>
<method name="push_color">
<return type="void" />
- <argument index="0" name="color" type="Color" />
+ <param index="0" name="color" type="Color" />
<description>
Adds a [code][color][/code] tag to the tag stack.
</description>
</method>
<method name="push_dropcap">
<return type="void" />
- <argument index="0" name="string" type="String" />
- <argument index="1" name="font" type="Font" />
- <argument index="2" name="size" type="int" />
- <argument index="3" name="dropcap_margins" type="Rect2" default="Rect2(0, 0, 0, 0)" />
- <argument index="4" name="color" type="Color" default="Color(1, 1, 1, 1)" />
- <argument index="5" name="outline_size" type="int" default="0" />
- <argument index="6" name="outline_color" type="Color" default="Color(0, 0, 0, 0)" />
+ <param index="0" name="string" type="String" />
+ <param index="1" name="font" type="Font" />
+ <param index="2" name="size" type="int" />
+ <param index="3" name="dropcap_margins" type="Rect2" default="Rect2(0, 0, 0, 0)" />
+ <param index="4" name="color" type="Color" default="Color(1, 1, 1, 1)" />
+ <param index="5" name="outline_size" type="int" default="0" />
+ <param index="6" name="outline_color" type="Color" default="Color(0, 0, 0, 0)" />
<description>
Adds a [code][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.
</description>
</method>
<method name="push_fgcolor">
<return type="void" />
- <argument index="0" name="fgcolor" type="Color" />
+ <param index="0" name="fgcolor" type="Color" />
<description>
Adds a [code][fgcolor][/code] tag to the tag stack.
</description>
</method>
<method name="push_font">
<return type="void" />
- <argument index="0" name="font" type="Font" />
- <argument index="1" name="font_size" type="int" />
+ <param index="0" name="font" type="Font" />
+ <param index="1" name="font_size" type="int" />
<description>
Adds a [code][font][/code] tag to the tag stack. Overrides default fonts for its duration.
</description>
</method>
<method name="push_font_size">
<return type="void" />
- <argument index="0" name="font_size" type="int" />
+ <param index="0" name="font_size" type="int" />
<description>
</description>
</method>
<method name="push_hint">
<return type="void" />
- <argument index="0" name="description" type="String" />
+ <param index="0" name="description" type="String" />
<description>
Adds a [code][hint][/code] tag to the tag stack. Same as BBCode [code][hint=something]{text}[/hint][/code].
</description>
</method>
<method name="push_indent">
<return type="void" />
- <argument index="0" name="level" type="int" />
+ <param index="0" name="level" type="int" />
<description>
- Adds an [code][indent][/code] tag to the tag stack. Multiplies [code]level[/code] by current [member tab_size] to determine new margin length.
+ Adds an [code][indent][/code] tag to the tag stack. Multiplies [param level] by current [member tab_size] to determine new margin length.
</description>
</method>
<method name="push_italics">
@@ -305,16 +305,16 @@
</method>
<method name="push_list">
<return type="void" />
- <argument index="0" name="level" type="int" />
- <argument index="1" name="type" type="int" enum="RichTextLabel.ListType" />
- <argument index="2" name="capitalize" type="bool" />
+ <param index="0" name="level" type="int" />
+ <param index="1" name="type" type="int" enum="RichTextLabel.ListType" />
+ <param index="2" name="capitalize" type="bool" />
<description>
- Adds [code][ol][/code] or [code][ul][/code] tag to the tag stack. Multiplies [code]level[/code] by current [member tab_size] to determine new margin length.
+ Adds [code][ol][/code] or [code][ul][/code] tag to the tag stack. Multiplies [param level] by current [member tab_size] to determine new margin length.
</description>
</method>
<method name="push_meta">
<return type="void" />
- <argument index="0" name="data" type="Variant" />
+ <param index="0" name="data" type="Variant" />
<description>
Adds a [code][meta][/code] tag to the tag stack. Similar to the BBCode [code][url=something]{text}[/url][/code], but supports non-[String] metadata types.
</description>
@@ -333,24 +333,24 @@
</method>
<method name="push_outline_color">
<return type="void" />
- <argument index="0" name="color" type="Color" />
+ <param index="0" name="color" type="Color" />
<description>
Adds a [code][outline_color][/code] tag to the tag stack. Adds text outline for its duration.
</description>
</method>
<method name="push_outline_size">
<return type="void" />
- <argument index="0" name="outline_size" type="int" />
+ <param index="0" name="outline_size" type="int" />
<description>
Adds a [code][outline_size][/code] tag to the tag stack. Overrides default text outline size for its duration.
</description>
</method>
<method name="push_paragraph">
<return type="void" />
- <argument index="0" name="alignment" type="int" enum="HorizontalAlignment" />
- <argument index="1" name="base_direction" type="int" enum="Control.TextDirection" default="0" />
- <argument index="2" name="language" type="String" default="&quot;&quot;" />
- <argument index="3" name="st_parser" type="int" enum="TextServer.StructuredTextParser" default="0" />
+ <param index="0" name="alignment" type="int" enum="HorizontalAlignment" />
+ <param index="1" name="base_direction" type="int" enum="Control.TextDirection" default="0" />
+ <param index="2" name="language" type="String" default="&quot;&quot;" />
+ <param index="3" name="st_parser" type="int" enum="TextServer.StructuredTextParser" default="0" />
<description>
Adds a [code][p][/code] tag to the tag stack.
</description>
@@ -363,8 +363,8 @@
</method>
<method name="push_table">
<return type="void" />
- <argument index="0" name="columns" type="int" />
- <argument index="1" name="inline_align" type="int" enum="InlineAlignment" default="0" />
+ <param index="0" name="columns" type="int" />
+ <param index="1" name="inline_align" type="int" enum="InlineAlignment" default="0" />
<description>
Adds a [code][table=columns,inline_align][/code] tag to the tag stack.
</description>
@@ -377,24 +377,24 @@
</method>
<method name="remove_line">
<return type="bool" />
- <argument index="0" name="line" type="int" />
+ <param index="0" name="line" type="int" />
<description>
Removes a line of content from the label. Returns [code]true[/code] if the line exists.
- The [code]line[/code] argument is the index of the line to remove, it can take values in the interval [code][0, get_line_count() - 1][/code].
+ The [param line] argument is the index of the line to remove, it can take values in the interval [code][0, get_line_count() - 1][/code].
</description>
</method>
<method name="scroll_to_line">
<return type="void" />
- <argument index="0" name="line" type="int" />
+ <param index="0" name="line" type="int" />
<description>
- Scrolls the window's top line to match [code]line[/code].
+ Scrolls the window's top line to match [param line].
</description>
</method>
<method name="scroll_to_paragraph">
<return type="void" />
- <argument index="0" name="paragraph" type="int" />
+ <param index="0" name="paragraph" type="int" />
<description>
- Scrolls the window's top line to match first line of the [code]paragraph[/code].
+ Scrolls the window's top line to match first line of the [param paragraph].
</description>
</method>
<method name="select_all">
@@ -406,43 +406,43 @@
</method>
<method name="set_cell_border_color">
<return type="void" />
- <argument index="0" name="color" type="Color" />
+ <param index="0" name="color" type="Color" />
<description>
Sets color of a table cell border.
</description>
</method>
<method name="set_cell_padding">
<return type="void" />
- <argument index="0" name="padding" type="Rect2" />
+ <param index="0" name="padding" type="Rect2" />
<description>
Sets inner padding of a table cell.
</description>
</method>
<method name="set_cell_row_background_color">
<return type="void" />
- <argument index="0" name="odd_row_bg" type="Color" />
- <argument index="1" name="even_row_bg" type="Color" />
+ <param index="0" name="odd_row_bg" type="Color" />
+ <param index="1" name="even_row_bg" type="Color" />
<description>
Sets color of a table cell. Separate colors for alternating rows can be specified.
</description>
</method>
<method name="set_cell_size_override">
<return type="void" />
- <argument index="0" name="min_size" type="Vector2" />
- <argument index="1" name="max_size" type="Vector2" />
+ <param index="0" name="min_size" type="Vector2" />
+ <param index="1" name="max_size" type="Vector2" />
<description>
Sets minimum and maximum size overrides for a table cell.
</description>
</method>
<method name="set_table_column_expand">
<return type="void" />
- <argument index="0" name="column" type="int" />
- <argument index="1" name="expand" type="bool" />
- <argument index="2" name="ratio" type="int" />
+ <param index="0" name="column" type="int" />
+ <param index="1" name="expand" type="bool" />
+ <param index="2" name="ratio" type="int" />
<description>
- Edits the selected column's expansion options. If [code]expand[/code] is [code]true[/code], the column expands in proportion to its expansion ratio versus the other columns' ratios.
+ 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.
For example, 2 columns with ratios 3 and 4 plus 70 pixels in available width would expand 30 and 40 pixels, respectively.
- If [code]expand[/code] is [code]false[/code], the column will not contribute to the total ratio.
+ If [param expand] is [code]false[/code], the column will not contribute to the total ratio.
</description>
</method>
</methods>
@@ -480,10 +480,6 @@
<member name="override_selected_font_color" type="bool" setter="set_override_selected_font_color" getter="is_overriding_selected_font_color" default="false">
If [code]true[/code], the label uses the custom font color.
</member>
- <member name="percent_visible" type="float" setter="set_percent_visible" getter="get_percent_visible" default="1.0">
- The range of characters to display, as a [float] between 0.0 and 1.0. When assigned an out of range value, it's the same as assigning 1.0.
- [b]Note:[/b] Setting this property updates [member visible_characters] based on current [method get_total_character_count].
- </member>
<member name="progress_bar_delay" type="int" setter="set_progress_bar_delay" getter="get_progress_bar_delay" default="1000">
The delay after which the loading progress bar is displayed, in milliseconds. Set to [code]-1[/code] to disable progress bar entirely.
[b]Note:[/b] Progress bar is displayed only if [member threaded] is enabled.
@@ -520,11 +516,15 @@
If [code]true[/code], text processing is done in a background thread.
</member>
<member name="visible_characters" type="int" setter="set_visible_characters" getter="get_visible_characters" default="-1">
- The restricted number of characters to display in the label. If [code]-1[/code], all characters will be displayed.
- [b]Note:[/b] Setting this property updates [member percent_visible] based on current [method get_total_character_count].
+ 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.
+ [b]Note:[/b] Setting this property updates [member visible_ratio] accordingly.
</member>
<member name="visible_characters_behavior" type="int" setter="set_visible_characters_behavior" getter="get_visible_characters_behavior" enum="TextServer.VisibleCharactersBehavior" default="0">
- Sets the clipping behavior when [member visible_characters] or [member percent_visible] is set. See [enum TextServer.VisibleCharactersBehavior] for more info.
+ Sets the clipping behavior when [member visible_characters] or [member visible_ratio] is set. See [enum TextServer.VisibleCharactersBehavior] for more info.
+ </member>
+ <member name="visible_ratio" type="float" setter="set_visible_ratio" getter="get_visible_ratio" default="1.0">
+ 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.
+ [b]Note:[/b] Setting this property updates [member visible_characters] accordingly.
</member>
</members>
<signals>
@@ -534,19 +534,19 @@
</description>
</signal>
<signal name="meta_clicked">
- <argument index="0" name="meta" type="Variant" />
+ <param index="0" name="meta" type="Variant" />
<description>
Triggered when the user clicks on content between meta tags. If the meta is defined in text, e.g. [code][url={"data"="hi"}]hi[/url][/code], then the parameter for this signal will 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.
</description>
</signal>
<signal name="meta_hover_ended">
- <argument index="0" name="meta" type="Variant" />
+ <param index="0" name="meta" type="Variant" />
<description>
Triggers when the mouse exits a meta tag.
</description>
</signal>
<signal name="meta_hover_started">
- <argument index="0" name="meta" type="Variant" />
+ <param index="0" name="meta" type="Variant" />
<description>
Triggers when the mouse enters a meta tag.
</description>