Table of Contents

Class LabelSettings

Namespace
Godot
Assembly
GodotSharp.dll

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.

public class LabelSettings : Resource, IDisposable
Inheritance
LabelSettings
Implements
Inherited Members

Constructors

LabelSettings()

public LabelSettings()

Properties

Font

Font used for the text.

public Font Font { get; set; }

Property Value

Font

FontColor

Color of the text.

public Color FontColor { get; set; }

Property Value

Color

FontSize

Size of the text.

public int FontSize { get; set; }

Property Value

int

LineSpacing

Vertical space between lines when the text is multiline.

public float LineSpacing { get; set; }

Property Value

float

OutlineColor

The color of the outline.

public Color OutlineColor { get; set; }

Property Value

Color

OutlineSize

Text outline size.

public int OutlineSize { get; set; }

Property Value

int

ShadowColor

Color of the shadow effect. If alpha is 0, no shadow will be drawn.

public Color ShadowColor { get; set; }

Property Value

Color

ShadowOffset

Offset of the shadow effect, in pixels.

public Vector2 ShadowOffset { get; set; }

Property Value

Vector2

ShadowSize

Size of the shadow effect.

public int ShadowSize { get; set; }

Property Value

int

Methods

HasGodotClassMethod(in godot_string_name)

Check if the type contains a method with the given name. This method is used by Godot to check if a method exists before invoking it. Do not call or override this method.

protected override bool HasGodotClassMethod(in godot_string_name method)

Parameters

method godot_string_name

Name of the method to check for.

Returns

bool

HasGodotClassSignal(in godot_string_name)

Check if the type contains a signal with the given name. This method is used by Godot to check if a signal exists before raising it. Do not call or override this method.

protected override bool HasGodotClassSignal(in godot_string_name signal)

Parameters

signal godot_string_name

Name of the signal to check for.

Returns

bool

InvokeGodotClassMethod(in godot_string_name, NativeVariantPtrArgs, out godot_variant)

Invokes the method with the given name, using the given arguments. This method is used by Godot to invoke methods from the engine side. Do not call or override this method.

protected override bool InvokeGodotClassMethod(in godot_string_name method, NativeVariantPtrArgs args, out godot_variant ret)

Parameters

method godot_string_name

Name of the method to invoke.

args NativeVariantPtrArgs

Arguments to use with the invoked method.

ret godot_variant

Value returned by the invoked method.

Returns

bool