diff options
Diffstat (limited to 'doc/classes/RichTextLabel.xml')
-rw-r--r-- | doc/classes/RichTextLabel.xml | 300 |
1 files changed, 100 insertions, 200 deletions
diff --git a/doc/classes/RichTextLabel.xml b/doc/classes/RichTextLabel.xml index 38884a027f..e1362917b0 100644 --- a/doc/classes/RichTextLabel.xml +++ b/doc/classes/RichTextLabel.xml @@ -16,443 +16,346 @@ </tutorials> <methods> <method name="add_image"> - <return type="void"> - </return> - <argument index="0" name="image" type="Texture2D"> - </argument> - <argument index="1" name="width" type="int" default="0"> - </argument> - <argument index="2" name="height" type="int" default="0"> - </argument> - <argument index="3" name="color" type="Color" default="Color(1, 1, 1, 1)"> - </argument> - <argument index="4" name="inline_align" type="int" enum="VAlign" default="0"> - </argument> + <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="VAlign" default="0" /> <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. </description> </method> <method name="add_text"> - <return type="void"> - </return> - <argument index="0" name="text" type="String"> - </argument> + <return type="void" /> + <argument index="0" name="text" type="String" /> <description> Adds raw non-BBCode-parsed text to the tag stack. </description> </method> <method name="append_bbcode"> - <return type="int" enum="Error"> - </return> - <argument index="0" name="bbcode" type="String"> - </argument> + <return type="int" enum="Error" /> + <argument index="0" name="bbcode" type="String" /> <description> Parses [code]bbcode[/code] and adds tags to the tag stack as needed. Returns the result of the parsing, [constant OK] if successful. [b]Note:[/b] Using this method, you can't close a tag that was opened in a previous [method append_bbcode] 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 bbcode_text] instead of using [method append_bbcode]. </description> </method> <method name="clear"> - <return type="void"> - </return> + <return type="void" /> <description> Clears the tag stack and sets [member bbcode_text] to an empty string. </description> </method> <method name="get_content_height" qualifiers="const"> - <return type="int"> - </return> + <return type="int" /> <description> Returns the height of the content. </description> </method> <method name="get_line_count" qualifiers="const"> - <return type="int"> - </return> + <return type="int" /> <description> Returns the total number of lines in the text. Wrapped text is counted as multiple lines. </description> </method> <method name="get_paragraph_count" qualifiers="const"> - <return type="int"> - </return> + <return type="int" /> <description> 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. </description> </method> <method name="get_selected_text" qualifiers="const"> - <return type="String"> - </return> + <return type="String" /> <description> Returns the current selection text. Does not include BBCodes. </description> </method> <method name="get_selection_from" qualifiers="const"> - <return type="int"> - </return> + <return type="int" /> <description> Returns the current selection first character index if a selection is active, [code]-1[/code] otherwise. Does not include BBCodes. </description> </method> <method name="get_selection_to" qualifiers="const"> - <return type="int"> - </return> + <return type="int" /> <description> Returns the current selection last character index if a selection is active, [code]-1[/code] otherwise. Does not include BBCodes. </description> </method> <method name="get_total_character_count" qualifiers="const"> - <return type="int"> - </return> + <return type="int" /> <description> Returns the total number of characters from text tags. Does not include BBCodes. </description> </method> <method name="get_v_scroll"> - <return type="VScrollBar"> - </return> + <return type="VScrollBar" /> <description> Returns the vertical scrollbar. </description> </method> <method name="get_visible_line_count" qualifiers="const"> - <return type="int"> - </return> + <return type="int" /> <description> Returns the number of visible lines. </description> </method> <method name="get_visible_paragraph_count" qualifiers="const"> - <return type="int"> - </return> + <return type="int" /> <description> Returns the number of visible paragraphs. A paragraph is considered visible if at least one of its lines is visible. </description> </method> <method name="install_effect"> - <return type="void"> - </return> - <argument index="0" name="effect" type="Variant"> - </argument> + <return type="void" /> + <argument index="0" name="effect" type="Variant" /> <description> Installs a custom effect. [code]effect[/code] should be a valid [RichTextEffect]. </description> </method> <method name="newline"> - <return type="void"> - </return> + <return type="void" /> <description> Adds a newline tag to the tag stack. </description> </method> <method name="parse_bbcode"> - <return type="int" enum="Error"> - </return> - <argument index="0" name="bbcode" type="String"> - </argument> + <return type="int" enum="Error" /> + <argument index="0" name="bbcode" type="String" /> <description> The assignment version of [method append_bbcode]. Clears the tag stack and inserts the new content. Returns [constant OK] if parses [code]bbcode[/code] successfully. </description> </method> <method name="parse_expressions_for_values"> - <return type="Dictionary"> - </return> - <argument index="0" name="expressions" type="PackedStringArray"> - </argument> + <return type="Dictionary" /> + <argument index="0" name="expressions" type="PackedStringArray" /> <description> Parses BBCode parameter [code]expressions[/code] into a dictionary. </description> </method> <method name="pop"> - <return type="void"> - </return> + <return type="void" /> <description> Terminates the current tag. Use after [code]push_*[/code] methods to close BBCodes manually. Does not need to follow [code]add_*[/code] methods. </description> </method> <method name="push_bgcolor"> - <return type="void"> - </return> - <argument index="0" name="bgcolor" type="Color"> - </argument> + <return type="void" /> + <argument index="0" name="bgcolor" type="Color" /> <description> Adds a [code][bgcolor][/code] tag to the tag stack. </description> </method> <method name="push_bold"> - <return type="void"> - </return> + <return type="void" /> <description> Adds a [code][font][/code] tag with a bold font to the tag stack. This is the same as adding a [code][b][/code] tag if not currently in a [code][i][/code] tag. </description> </method> <method name="push_bold_italics"> - <return type="void"> - </return> + <return type="void" /> <description> Adds a [code][font][/code] tag with a bold italics font to the tag stack. </description> </method> <method name="push_cell"> - <return type="void"> - </return> + <return type="void" /> <description> Adds a [code][cell][/code] tag to the tag stack. Must be inside a [code][table][/code] tag. See [method push_table] for details. </description> </method> <method name="push_color"> - <return type="void"> - </return> - <argument index="0" name="color" type="Color"> - </argument> + <return type="void" /> + <argument 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"> - </return> - <argument index="0" name="string" type="String"> - </argument> - <argument index="1" name="font" type="Font"> - </argument> - <argument index="2" name="size" type="int"> - </argument> - <argument index="3" name="dropcap_margins" type="Rect2" default="Rect2(0, 0, 0, 0)"> - </argument> - <argument index="4" name="color" type="Color" default="Color(1, 1, 1, 1)"> - </argument> - <argument index="5" name="outline_size" type="int" default="0"> - </argument> - <argument index="6" name="outline_color" type="Color" default="Color(0, 0, 0, 0)"> - </argument> + <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)" /> <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"> - </return> - <argument index="0" name="fgcolor" type="Color"> - </argument> + <return type="void" /> + <argument 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"> - </return> - <argument index="0" name="font" type="Font"> - </argument> + <return type="void" /> + <argument index="0" name="font" type="Font" /> <description> Adds a [code][font][/code] tag to the tag stack. Overrides default fonts for its duration. </description> </method> <method name="push_font_features"> - <return type="void"> - </return> - <argument index="0" name="opentype_features" type="Dictionary"> - </argument> + <return type="void" /> + <argument index="0" name="opentype_features" type="Dictionary" /> <description> Adds a [code][ot_feature][/code] tag to the tag stack. Overrides default OpenType font feature for its duration. </description> </method> <method name="push_font_size"> - <return type="void"> - </return> - <argument index="0" name="font_size" type="int"> - </argument> + <return type="void" /> + <argument index="0" name="font_size" type="int" /> <description> Adds a [code][font_size][/code] tag to the tag stack. Overrides default font size for its duration. </description> </method> <method name="push_indent"> - <return type="void"> - </return> - <argument index="0" name="level" type="int"> - </argument> + <return type="void" /> + <argument 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. </description> </method> <method name="push_italics"> - <return type="void"> - </return> + <return type="void" /> <description> Adds a [code][font][/code] tag with a italics font to the tag stack. This is the same as adding a [code][i][/code] tag if not currently in a [code][b][/code] tag. </description> </method> <method name="push_list"> - <return type="void"> - </return> - <argument index="0" name="level" type="int"> - </argument> - <argument index="1" name="type" type="int" enum="RichTextLabel.ListType"> - </argument> - <argument index="2" name="capitalize" type="bool"> - </argument> + <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" /> <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. </description> </method> <method name="push_meta"> - <return type="void"> - </return> - <argument index="0" name="data" type="Variant"> - </argument> + <return type="void" /> + <argument 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> </method> <method name="push_mono"> - <return type="void"> - </return> + <return type="void" /> <description> Adds a [code][font][/code] tag with a monospace font to the tag stack. </description> </method> <method name="push_normal"> - <return type="void"> - </return> + <return type="void" /> <description> Adds a [code][font][/code] tag with a normal font to the tag stack. </description> </method> <method name="push_outline_color"> - <return type="void"> - </return> - <argument index="0" name="color" type="Color"> - </argument> + <return type="void" /> + <argument 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"> - </return> - <argument index="0" name="outline_size" type="int"> - </argument> + <return type="void" /> + <argument 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"> - </return> - <argument index="0" name="align" type="int" enum="RichTextLabel.Align"> - </argument> - <argument index="1" name="base_direction" type="int" enum="Control.TextDirection" default="0"> - </argument> - <argument index="2" name="language" type="String" default=""""> - </argument> - <argument index="3" name="st_parser" type="int" enum="Control.StructuredTextParser" default="0"> - </argument> + <return type="void" /> + <argument index="0" name="align" type="int" enum="RichTextLabel.Align" /> + <argument index="1" name="base_direction" type="int" enum="Control.TextDirection" default="0" /> + <argument index="2" name="language" type="String" default="""" /> + <argument index="3" name="st_parser" type="int" enum="Control.StructuredTextParser" default="0" /> <description> Adds a [code][p][/code] tag to the tag stack. </description> </method> <method name="push_strikethrough"> - <return type="void"> - </return> + <return type="void" /> <description> Adds a [code][s][/code] tag to the tag stack. </description> </method> <method name="push_table"> - <return type="void"> - </return> - <argument index="0" name="columns" type="int"> - </argument> - <argument index="1" name="inline_align" type="int" enum="VAlign" default="0"> - </argument> + <return type="void" /> + <argument index="0" name="columns" type="int" /> + <argument index="1" name="inline_align" type="int" enum="VAlign" default="0" /> <description> Adds a [code][table=columns,inline_align][/code] tag to the tag stack. </description> </method> <method name="push_underline"> - <return type="void"> - </return> + <return type="void" /> <description> Adds a [code][u][/code] tag to the tag stack. </description> </method> <method name="remove_line"> - <return type="bool"> - </return> - <argument index="0" name="line" type="int"> - </argument> + <return type="bool" /> + <argument 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]. </description> </method> <method name="scroll_to_line"> - <return type="void"> - </return> - <argument index="0" name="line" type="int"> - </argument> + <return type="void" /> + <argument index="0" name="line" type="int" /> <description> Scrolls the window's top line to match [code]line[/code]. </description> </method> <method name="scroll_to_paragraph"> - <return type="void"> - </return> - <argument index="0" name="paragraph" type="int"> - </argument> + <return type="void" /> + <argument index="0" name="paragraph" type="int" /> <description> Scrolls the window's top line to match first line of the [code]paragraph[/code]. </description> </method> <method name="set_cell_border_color"> - <return type="void"> - </return> - <argument index="0" name="color" type="Color"> - </argument> + <return type="void" /> + <argument index="0" name="color" type="Color" /> <description> Sets color of a table cell border. </description> </method> <method name="set_cell_padding"> - <return type="void"> - </return> - <argument index="0" name="padding" type="Rect2"> - </argument> + <return type="void" /> + <argument 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"> - </return> - <argument index="0" name="odd_row_bg" type="Color"> - </argument> - <argument index="1" name="even_row_bg" type="Color"> - </argument> + <return type="void" /> + <argument index="0" name="odd_row_bg" type="Color" /> + <argument 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"> - </return> - <argument index="0" name="min_size" type="Vector2"> - </argument> - <argument index="1" name="max_size" type="Vector2"> - </argument> + <return type="void" /> + <argument index="0" name="min_size" type="Vector2" /> + <argument 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"> - </return> - <argument index="0" name="column" type="int"> - </argument> - <argument index="1" name="expand" type="bool"> - </argument> - <argument index="2" name="ratio" type="int"> - </argument> + <return type="void" /> + <argument index="0" name="column" type="int" /> + <argument index="1" name="expand" type="bool" /> + <argument 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. For example, 2 columns with ratios 3 and 4 plus 70 pixels in available width would expand 30 and 40 pixels, respectively. @@ -522,22 +425,19 @@ </members> <signals> <signal name="meta_clicked"> - <argument index="0" name="meta" type="Variant"> - </argument> + <argument 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"> - </argument> + <argument 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"> - </argument> + <argument index="0" name="meta" type="Variant" /> <description> Triggers when the mouse enters a meta tag. </description> |