diff options
Diffstat (limited to 'doc/classes/Label.xml')
-rw-r--r-- | doc/classes/Label.xml | 182 |
1 files changed, 13 insertions, 169 deletions
diff --git a/doc/classes/Label.xml b/doc/classes/Label.xml index 1d1ce63a58..24c28fc810 100644 --- a/doc/classes/Label.xml +++ b/doc/classes/Label.xml @@ -1,23 +1,17 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="Label" inherits="Control" category="Core" version="3.0.alpha.custom_build"> +<class name="Label" inherits="Control" category="Core" version="3.1"> <brief_description> Displays plain text in a line or wrapped inside a rectangle. For formatted text, use [RichTextLabel]. </brief_description> <description> Label displays plain text on the screen. It gives you control over the horizontal and vertical alignment, and can wrap the text inside the node's bounding rectangle. It doesn't support bold, italics or other formatting. For that, use [RichTextLabel] instead. + Note that contrarily to most other [Control]s, Label's [member Control.mouse_filter] defaults to MOUSE_FILTER_IGNORE (i.e. it doesn't react to mouse input events). </description> <tutorials> </tutorials> <demos> </demos> <methods> - <method name="get_align" qualifiers="const"> - <return type="int" enum="Label.Align"> - </return> - <description> - Returns the alignment mode (any of the ALIGN_* enumeration values). - </description> - </method> <method name="get_line_count" qualifiers="const"> <return type="int"> </return> @@ -32,34 +26,6 @@ Returns the font size in pixels. </description> </method> - <method name="get_lines_skipped" qualifiers="const"> - <return type="int"> - </return> - <description> - Returns the the number of lines to skip before displaying. - </description> - </method> - <method name="get_max_lines_visible" qualifiers="const"> - <return type="int"> - </return> - <description> - Returns the maximum number of lines to display. Returns -1 if unrestricted. - </description> - </method> - <method name="get_percent_visible" qualifiers="const"> - <return type="float"> - </return> - <description> - Returns the maximum number of characters to display as a percentage of the total text. - </description> - </method> - <method name="get_text" qualifiers="const"> - <return type="String"> - </return> - <description> - Returns the label text. Text can contain newlines. - </description> - </method> <method name="get_total_character_count" qualifiers="const"> <return type="int"> </return> @@ -67,20 +33,6 @@ Returns the total length of the text. </description> </method> - <method name="get_valign" qualifiers="const"> - <return type="int" enum="Label.VAlign"> - </return> - <description> - Returns the vertical alignment mode (any of the VALIGN_* enumeration values). - </description> - </method> - <method name="get_visible_characters" qualifiers="const"> - <return type="int"> - </return> - <description> - Returns the restricted number of characters to display. Returns -1 if unrestricted. - </description> - </method> <method name="get_visible_line_count" qualifiers="const"> <return type="int"> </return> @@ -88,117 +40,6 @@ Returns the number of lines shown. Useful if the [code]Label[/code] 's height cannot currently display all lines. </description> </method> - <method name="has_autowrap" qualifiers="const"> - <return type="bool"> - </return> - <description> - Returns [code]true[/code] if [i]autowrap[/i] mode (see [method set_autowrap]). - </description> - </method> - <method name="is_clipping_text" qualifiers="const"> - <return type="bool"> - </return> - <description> - Returns [code]true[/code] if text would be cut off if it is too wide. - </description> - </method> - <method name="is_uppercase" qualifiers="const"> - <return type="bool"> - </return> - <description> - Returns [code]true[/code] if text is displayed in all capitals. - </description> - </method> - <method name="set_align"> - <return type="void"> - </return> - <argument index="0" name="align" type="int" enum="Label.Align"> - </argument> - <description> - Sets the alignment mode to any of the ALIGN_* enumeration values. - </description> - </method> - <method name="set_autowrap"> - <return type="void"> - </return> - <argument index="0" name="enable" type="bool"> - </argument> - <description> - Set [i]autowrap[/i] mode. When enabled, autowrap will fit text to the control width, breaking sentences when they exceed the available horizontal space. When disabled, the label minimum width becomes the width of the longest row, and the minimum height large enough to fit all rows. - </description> - </method> - <method name="set_clip_text"> - <return type="void"> - </return> - <argument index="0" name="enable" type="bool"> - </argument> - <description> - Cuts off the rest of the text if it is too wide. - </description> - </method> - <method name="set_lines_skipped"> - <return type="void"> - </return> - <argument index="0" name="lines_skipped" type="int"> - </argument> - <description> - Sets the number of lines to skip before displaying. Useful for scrolling text. - </description> - </method> - <method name="set_max_lines_visible"> - <return type="void"> - </return> - <argument index="0" name="lines_visible" type="int"> - </argument> - <description> - Restricts the number of lines to display. Set to -1 to disable. - </description> - </method> - <method name="set_percent_visible"> - <return type="void"> - </return> - <argument index="0" name="percent_visible" type="float"> - </argument> - <description> - Restricts the number of characters to display (as a percentage of the total text). - </description> - </method> - <method name="set_text"> - <return type="void"> - </return> - <argument index="0" name="text" type="String"> - </argument> - <description> - Set the label text. Text can contain newlines. - </description> - </method> - <method name="set_uppercase"> - <return type="void"> - </return> - <argument index="0" name="enable" type="bool"> - </argument> - <description> - Display text in all capitals. - </description> - </method> - <method name="set_valign"> - <return type="void"> - </return> - <argument index="0" name="valign" type="int" enum="Label.VAlign"> - </argument> - <description> - Sets the vertical alignment mode to any of the VALIGN_* enumeration values. - </description> - </method> - <method name="set_visible_characters"> - <return type="void"> - </return> - <argument index="0" name="amount" type="int"> - </argument> - <description> - Restricts the number of characters to display. Set to -1 to disable. - </description> - </method> </methods> <members> <member name="align" type="int" setter="set_align" getter="get_align" enum="Label.Align"> @@ -228,30 +69,33 @@ <member name="valign" type="int" setter="set_valign" getter="get_valign" enum="Label.VAlign"> Controls the text's vertical align. Supports top, center, bottom, and fill. Set it to one of the [code]VALIGN_*[/code] constants. </member> + <member name="visible_characters" type="int" setter="set_visible_characters" getter="get_visible_characters"> + Restricts the number of characters to display. Set to -1 to disable. + </member> </members> <constants> - <constant name="ALIGN_LEFT" value="0"> + <constant name="ALIGN_LEFT" value="0" enum="Align"> Align rows to the left (default). </constant> - <constant name="ALIGN_CENTER" value="1"> + <constant name="ALIGN_CENTER" value="1" enum="Align"> Align rows centered. </constant> - <constant name="ALIGN_RIGHT" value="2"> + <constant name="ALIGN_RIGHT" value="2" enum="Align"> Align rows to the right (default). </constant> - <constant name="ALIGN_FILL" value="3"> + <constant name="ALIGN_FILL" value="3" enum="Align"> Expand row whitespaces to fit the width. </constant> - <constant name="VALIGN_TOP" value="0"> + <constant name="VALIGN_TOP" value="0" enum="VAlign"> Align the whole text to the top. </constant> - <constant name="VALIGN_CENTER" value="1"> + <constant name="VALIGN_CENTER" value="1" enum="VAlign"> Align the whole text to the center. </constant> - <constant name="VALIGN_BOTTOM" value="2"> + <constant name="VALIGN_BOTTOM" value="2" enum="VAlign"> Align the whole text to the bottom. </constant> - <constant name="VALIGN_FILL" value="3"> + <constant name="VALIGN_FILL" value="3" enum="VAlign"> Align the whole text by spreading the rows. </constant> </constants> |