LabelSettings
Provides common settings to customize the text in a Label
.
class LabelSettings
LabelSettings
is a resource that provides common settings to customize the text in a Label
. It will take priority over the properties defined in 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.
Superclasses
class Resource
Base class for serializable objects.
Citizens in SwiftGodot
Conformances
protocol CustomStringConvertible
A type with a customized textual representation.
protocol Equatable
A type that can be compared for value equality.
protocol Hashable
A type that can be hashed into a
Hasher
to produce an integer hash value.protocol Identifiable<ID>
A class of types whose instances hold the value of an entity with stable identity.
protocol VariantRepresentable
Types that conform to VariantRepresentable can be stored directly in
Variant
with no conversion. These include all of the Variant types from Godot (for exampleGString
,Rect
,Plane
), Godot objects (those that subclass SwiftGodot.Object) as well as the built-in Swift types UInt8, Int64 and Double.protocol VariantStorable
Types that conform to VariantStorable can be stored in a Variant and can be extracted back out of a Variant.
Type members
Instance members
var font: Font?
Font
used for the text.var fontColor: Color
Color of the text.
var fontSize: Int32
Size of the text.
var lineSpacing: Double
Vertical space between lines when the text is multiline.
var outlineColor: Color
The color of the outline.
var outlineSize: Int32
Text outline size.
var shadowColor: Color
Color of the shadow effect. If alpha is
0
, no shadow will be drawn.var shadowOffset: Vector2
Offset of the shadow effect, in pixels.
var shadowSize: Int32
Size of the shadow effect.