LabelSettings
继承: Resource < RefCounted < Object
Provides common settings to customize the text in a Label.
描述
LabelSettings is a resource that provides common settings to customize the text in a Label. It will take priority over the properties defined in 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.
属性
Font | font |
Color | font_color |
int | font_size |
float | line_spacing |
Color | outline_color |
int | outline_size |
Color | shadow_color |
Vector2 | shadow_offset |
int | shadow_size |
属性说明
Font font
Font used for the text.
Color font_color = Color(1, 1, 1, 1)
Color of the text.
int font_size = 16
Size of the text.
float line_spacing = 3.0
Vertical space between lines when the text is multiline.
Color outline_color = Color(1, 1, 1, 1)
The color of the outline.
int outline_size = 0
Text outline size.
Color shadow_color = Color(0, 0, 0, 0)
Color of the shadow effect. If alpha is 0, no shadow will be drawn.
Vector2 shadow_offset = Vector2(1, 1)
Offset of the shadow effect, in pixels.
int shadow_size = 1
Size of the shadow effect.
本方法通常需要用户覆盖才能生效。
本方法无副作用,不会修改该实例的任何成员变量。
本方法除了能接受在此处描述的参数外,还能够继续接受任意数量的参数。
本方法用于构造某个类型。
调用本方法无需实例,可直接使用类名进行调用。
本方法描述的是使用本类型作为左操作数的有效运算符。
这个值是由下列位标志构成位掩码的整数。
无返回值。