2022-06-17 11:05:18 +03:00
<?xml version="1.0" encoding="UTF-8" ?>
2023-07-06 10:08:05 +02:00
<class name= "LabelSettings" inherits= "Resource" xmlns:xsi= "http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation= "../class.xsd" >
2022-06-17 11:05:18 +03:00
<brief_description >
2023-04-30 16:26:09 +02:00
Provides common settings to customize the text in a [Label].
2022-06-17 11:05:18 +03:00
</brief_description>
<description >
2023-04-30 16:26:09 +02:00
[LabelSettings] is a resource that provides common settings to customize the text in a [Label]. It will take priority over the properties defined in [member Control.theme]. The resource can be shared between multiple labels and changed on the fly, so it's convenient and flexible way to setup text style.
2022-06-17 11:05:18 +03:00
</description>
<tutorials >
</tutorials>
2025-04-02 21:16:53 +08:00
<methods >
<method name= "add_stacked_outline" >
<return type= "void" />
<param index= "0" name= "index" type= "int" default= "-1" />
<description >
Adds a new stacked outline to the label at the given [param index]. If [param index] is [code]-1[/code], the new stacked outline will be added at the end of the list.
</description>
</method>
<method name= "add_stacked_shadow" >
<return type= "void" />
<param index= "0" name= "index" type= "int" default= "-1" />
<description >
Adds a new stacked shadow to the label at the given [param index]. If [param index] is [code]-1[/code], the new stacked shadow will be added at the end of the list.
</description>
</method>
<method name= "get_stacked_outline_color" qualifiers= "const" >
<return type= "Color" />
<param index= "0" name= "index" type= "int" />
<description >
Returns the color of the stacked outline at [param index].
</description>
</method>
<method name= "get_stacked_outline_size" qualifiers= "const" >
<return type= "int" />
<param index= "0" name= "index" type= "int" />
<description >
Returns the size of the stacked outline at [param index].
</description>
</method>
<method name= "get_stacked_shadow_color" qualifiers= "const" >
<return type= "Color" />
<param index= "0" name= "index" type= "int" />
<description >
Returns the color of the stacked shadow at [param index].
</description>
</method>
<method name= "get_stacked_shadow_offset" qualifiers= "const" >
<return type= "Vector2" />
<param index= "0" name= "index" type= "int" />
<description >
Returns the offset of the stacked shadow at [param index].
</description>
</method>
<method name= "get_stacked_shadow_outline_size" qualifiers= "const" >
<return type= "int" />
<param index= "0" name= "index" type= "int" />
<description >
Returns the outline size of the stacked shadow at [param index].
</description>
</method>
<method name= "move_stacked_outline" >
<return type= "void" />
<param index= "0" name= "from_index" type= "int" />
<param index= "1" name= "to_position" type= "int" />
<description >
Moves the stacked outline at index [param from_index] to the given position [param to_position] in the array.
</description>
</method>
<method name= "move_stacked_shadow" >
<return type= "void" />
<param index= "0" name= "from_index" type= "int" />
<param index= "1" name= "to_position" type= "int" />
<description >
Moves the stacked shadow at index [param from_index] to the given position [param to_position] in the array.
</description>
</method>
<method name= "remove_stacked_outline" >
<return type= "void" />
<param index= "0" name= "index" type= "int" />
<description >
Removes the stacked outline at index [param index].
</description>
</method>
<method name= "remove_stacked_shadow" >
<return type= "void" />
<param index= "0" name= "index" type= "int" />
<description >
Removes the stacked shadow at index [param index].
</description>
</method>
<method name= "set_stacked_outline_color" >
<return type= "void" />
<param index= "0" name= "index" type= "int" />
<param index= "1" name= "color" type= "Color" />
<description >
Sets the color of the stacked outline identified by the given [param index] to [param color].
</description>
</method>
<method name= "set_stacked_outline_size" >
<return type= "void" />
<param index= "0" name= "index" type= "int" />
<param index= "1" name= "size" type= "int" />
<description >
Sets the size of the stacked outline identified by the given [param index] to [param size].
</description>
</method>
<method name= "set_stacked_shadow_color" >
<return type= "void" />
<param index= "0" name= "index" type= "int" />
<param index= "1" name= "color" type= "Color" />
<description >
Sets the color of the stacked shadow identified by the given [param index] to [param color].
</description>
</method>
<method name= "set_stacked_shadow_offset" >
<return type= "void" />
<param index= "0" name= "index" type= "int" />
<param index= "1" name= "offset" type= "Vector2" />
<description >
Sets the offset of the stacked shadow identified by the given [param index] to [param offset].
</description>
</method>
<method name= "set_stacked_shadow_outline_size" >
<return type= "void" />
<param index= "0" name= "index" type= "int" />
<param index= "1" name= "size" type= "int" />
<description >
Sets the outline size of the stacked shadow identified by the given [param index] to [param size].
</description>
</method>
</methods>
2022-06-17 11:05:18 +03:00
<members >
<member name= "font" type= "Font" setter= "set_font" getter= "get_font" >
2022-11-21 03:48:36 +01:00
[Font] used for the text.
2022-06-17 11:05:18 +03:00
</member>
2022-08-01 12:41:56 +03:00
<member name= "font_color" type= "Color" setter= "set_font_color" getter= "get_font_color" default= "Color(1, 1, 1, 1)" >
2022-11-21 03:48:36 +01:00
Color of the text.
2022-06-17 11:05:18 +03:00
</member>
<member name= "font_size" type= "int" setter= "set_font_size" getter= "get_font_size" default= "16" >
2022-11-21 03:48:36 +01:00
Size of the text.
2022-06-17 11:05:18 +03:00
</member>
2022-08-01 12:41:56 +03:00
<member name= "line_spacing" type= "float" setter= "set_line_spacing" getter= "get_line_spacing" default= "3.0" >
2024-10-09 19:41:03 +03:00
Additional vertical spacing between lines (in pixels), spacing is added to line descent. This value can be negative.
2022-06-17 11:05:18 +03:00
</member>
<member name= "outline_color" type= "Color" setter= "set_outline_color" getter= "get_outline_color" default= "Color(1, 1, 1, 1)" >
2022-11-21 03:48:36 +01:00
The color of the outline.
2022-06-17 11:05:18 +03:00
</member>
<member name= "outline_size" type= "int" setter= "set_outline_size" getter= "get_outline_size" default= "0" >
2022-11-21 03:48:36 +01:00
Text outline size.
2022-06-17 11:05:18 +03:00
</member>
2024-10-28 10:37:07 +02:00
<member name= "paragraph_spacing" type= "float" setter= "set_paragraph_spacing" getter= "get_paragraph_spacing" default= "0.0" >
Vertical space between paragraphs. Added on top of [member line_spacing].
</member>
2022-08-01 12:41:56 +03:00
<member name= "shadow_color" type= "Color" setter= "set_shadow_color" getter= "get_shadow_color" default= "Color(0, 0, 0, 0)" >
2022-11-21 03:48:36 +01:00
Color of the shadow effect. If alpha is [code]0[/code], no shadow will be drawn.
2022-06-17 11:05:18 +03:00
</member>
<member name= "shadow_offset" type= "Vector2" setter= "set_shadow_offset" getter= "get_shadow_offset" default= "Vector2(1, 1)" >
2022-11-21 03:48:36 +01:00
Offset of the shadow effect, in pixels.
2022-06-17 11:05:18 +03:00
</member>
2022-08-01 12:41:56 +03:00
<member name= "shadow_size" type= "int" setter= "set_shadow_size" getter= "get_shadow_size" default= "1" >
2022-11-21 03:48:36 +01:00
Size of the shadow effect.
2022-06-17 11:05:18 +03:00
</member>
2025-04-02 21:16:53 +08:00
<member name= "stacked_outline_count" type= "int" setter= "set_stacked_outline_count" getter= "get_stacked_outline_count" default= "0" >
The number of stacked outlines.
</member>
<member name= "stacked_shadow_count" type= "int" setter= "set_stacked_shadow_count" getter= "get_stacked_shadow_count" default= "0" >
Returns the stacked shadow count.
</member>
2022-06-17 11:05:18 +03:00
</members>
</class>