diff options
Diffstat (limited to 'doc/classes/RichTextLabel.xml')
-rw-r--r-- | doc/classes/RichTextLabel.xml | 28 |
1 files changed, 26 insertions, 2 deletions
diff --git a/doc/classes/RichTextLabel.xml b/doc/classes/RichTextLabel.xml index 0fd440fa75..147e41bf1b 100644 --- a/doc/classes/RichTextLabel.xml +++ b/doc/classes/RichTextLabel.xml @@ -6,6 +6,7 @@ <description> Rich text can contain custom text, fonts, images and some basic formatting. The label manages these as an internal tag stack. It also adapts itself to given width/heights. [b]Note:[/b] Assignments to [member bbcode_text] clear the tag stack and reconstruct it from the property's contents. Any edits made to [member bbcode_text] will erase previous edits made from other manual sources such as [method append_bbcode] and the [code]push_*[/code] / [method pop] methods. + [b]Note:[/b] RichTextLabel doesn't support entangled BBCode tags. For example, instead of using [code][b]bold[i]bold italic[/b]italic[/i][/code], use [code][b]bold[i]bold italic[/i][/b][i]italic[/i][/code]. [b]Note:[/b] Unlike [Label], RichTextLabel doesn't have a [i]property[/i] to horizontally align text to the center. Instead, enable [member bbcode_enabled] and surround the text in a [code][center][/code] tag as follows: [code][center]Example[/center][/code]. There is currently no built-in way to vertically align text either, but this can be emulated by relying on anchors/containers and the [member fit_content_height] property. </description> <tutorials> @@ -164,6 +165,27 @@ 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> + <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_font"> <return type="void"> </return> @@ -525,10 +547,12 @@ </constant> <constant name="ITEM_RAINBOW" value="20" enum="ItemType"> </constant> - <constant name="ITEM_CUSTOMFX" value="22" enum="ItemType"> - </constant> <constant name="ITEM_META" value="21" enum="ItemType"> </constant> + <constant name="ITEM_DROPCAP" value="22" enum="ItemType"> + </constant> + <constant name="ITEM_CUSTOMFX" value="23" enum="ItemType"> + </constant> </constants> <theme_items> <theme_item name="bold_font" type="Font"> |