diff options
Diffstat (limited to 'doc/classes/RichTextLabel.xml')
-rw-r--r-- | doc/classes/RichTextLabel.xml | 53 |
1 files changed, 29 insertions, 24 deletions
diff --git a/doc/classes/RichTextLabel.xml b/doc/classes/RichTextLabel.xml index ef01eba49d..cb2481f705 100644 --- a/doc/classes/RichTextLabel.xml +++ b/doc/classes/RichTextLabel.xml @@ -23,9 +23,11 @@ <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" /> + <param index="5" name="region" type="Rect2" default="Rect2(0, 0, 0, 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. + 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. + If [param width] or [param height] is set to 0, the image size will be adjusted in order to keep the original aspect ratio. + If [param width] and [param height] are not set, but [param region] is, the region's rect will be used. </description> </method> <method name="add_text"> @@ -39,7 +41,7 @@ <return type="void" /> <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> @@ -176,7 +178,7 @@ <return type="void" /> <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"> @@ -208,7 +210,7 @@ <return type="Dictionary" /> <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"> @@ -294,7 +296,7 @@ <return type="void" /> <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"> @@ -309,7 +311,7 @@ <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"> @@ -380,21 +382,21 @@ <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" /> <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" /> <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"> @@ -440,9 +442,9 @@ <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> @@ -477,13 +479,6 @@ <member name="meta_underlined" type="bool" setter="set_meta_underline" getter="is_meta_underlined" default="true"> If [code]true[/code], the label underlines meta tags such as [code][url]{text}[/url][/code]. </member> - <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 +515,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> @@ -627,8 +626,8 @@ <theme_item name="font_outline_color" data_type="color" type="Color" default="Color(1, 1, 1, 1)"> The default tint of text outline. </theme_item> - <theme_item name="font_selected_color" data_type="color" type="Color" default="Color(0, 0, 0, 1)"> - The color of selected text, used when [member selection_enabled] is [code]true[/code]. + <theme_item name="font_selected_color" data_type="color" type="Color" default="Color(0, 0, 0, 0)"> + 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. </theme_item> <theme_item name="font_shadow_color" data_type="color" type="Color" default="Color(0, 0, 0, 0)"> The color of the font's shadow. @@ -666,6 +665,12 @@ <theme_item name="table_v_separation" data_type="constant" type="int" default="3"> The vertical separation of elements in a table. </theme_item> + <theme_item name="text_highlight_h_padding" data_type="constant" type="int" default="3"> + The horizontal padding around a highlighting and background color box. + </theme_item> + <theme_item name="text_highlight_v_padding" data_type="constant" type="int" default="3"> + The vertical padding around a highlighting and background color box. + </theme_item> <theme_item name="bold_font" data_type="font" type="Font"> The font used for bold text. </theme_item> |