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。
Color font_color = Color(1, 1, 1, 1)
🔗
文本的颜色。
文本的大小。
行与行之间的额外纵向留白(单位为像素),留白会被添加到行的降部。该值可以为负数。
Color outline_color = Color(1, 1, 1, 1)
🔗
轮廓的颜色。
文本轮廓大小。
float paragraph_spacing = 0.0
🔗
段落之间的垂直空间。在 line_spacing 上添加。
Color shadow_color = Color(0, 0, 0, 0)
🔗
阴影效果的颜色。如果 Alpha 为 0
,则不会绘制阴影。
Vector2 shadow_offset = Vector2(1, 1)
🔗
阴影效果的偏移,单位为像素。
阴影效果的大小。