Attention: Here be dragons
This is the latest
(unstable) version of this documentation, which may document features
not available in or compatible with released stable versions of Godot.
Checking the stable version of the documentation...
LabelSettings¶
继承: Resource < RefCounted < Object
提供能够在 Label 中自定义文本的常见设置。
描述¶
LabelSettings 是一种提供在 Label 中自定义文本的常见设置的资源。优先于 Control.theme 中定义的属性。该资源可以在多个标签之间共享,可以随时替换,因此可以方便、灵活地设置文本样式。
属性¶
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
属性说明¶
Font font
文本使用的 Font。
Color font_color = Color(1, 1, 1, 1)
文本的颜色。
int font_size = 16
文本的大小。
float line_spacing = 3.0
文本为多行时,行与行之间的垂直间距。
Color outline_color = Color(1, 1, 1, 1)
轮廓的颜色。
int outline_size = 0
文本轮廓大小。
Color shadow_color = Color(0, 0, 0, 0)
阴影效果的颜色。如果 Alpha 为 0
,则不会绘制阴影。
Vector2 shadow_offset = Vector2(1, 1)
阴影效果的偏移,单位为像素。
int shadow_size = 1
阴影效果的大小。