Up to date
This page is up to date for Godot 4.3.
If you still find outdated information, please open an issue.
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) 🔗
轮廓的颜色。
文本轮廓大小。
Color shadow_color = Color(0, 0, 0, 0) 🔗
阴影效果的颜色。如果 Alpha 为 0 ,则不会绘制阴影。
Vector2 shadow_offset = Vector2(1, 1) 🔗
阴影效果的偏移,单位为像素。
阴影效果的大小。