Table of Contents

Class ThemeDBInstance

Namespace
Godot
Assembly
GodotSharp.dll

This singleton provides access to static information about Theme resources used by the engine and by your projects. You can fetch the default engine theme, as well as your project configured theme.

ThemeDB also contains fallback values for theme properties.

[GodotClassName("ThemeDB")]
public class ThemeDBInstance : GodotObject, IDisposable
Inheritance
ThemeDBInstance
Implements
Inherited Members

Properties

FallbackBaseScale

The fallback base scale factor of every Control node and Theme resource. Used when no other value is available to the control.

See also DefaultBaseScale.

public float FallbackBaseScale { get; set; }

Property Value

float

FallbackFont

The fallback font of every Control node and Theme resource. Used when no other value is available to the control.

See also DefaultFont.

public Font FallbackFont { get; set; }

Property Value

Font

FallbackFontSize

The fallback font size of every Control node and Theme resource. Used when no other value is available to the control.

See also DefaultFontSize.

public int FallbackFontSize { get; set; }

Property Value

int

FallbackIcon

The fallback icon of every Control node and Theme resource. Used when no other value is available to the control.

public Texture2D FallbackIcon { get; set; }

Property Value

Texture2D

FallbackStylebox

The fallback stylebox of every Control node and Theme resource. Used when no other value is available to the control.

public StyleBox FallbackStylebox { get; set; }

Property Value

StyleBox

Methods

GetDefaultTheme()

Returns a reference to the default engine Theme. This theme resource is responsible for the out-of-the-box look of Control nodes and cannot be overridden.

public Theme GetDefaultTheme()

Returns

Theme

GetProjectTheme()

Returns a reference to the custom project Theme. This theme resources allows to override the default engine theme for every control node in the project.

To set the project theme, see ProjectSettings.gui/theme/custom.

public Theme GetProjectTheme()

Returns

Theme

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

Events

FallbackChanged

Emitted when one of the fallback values had been changed. Use it to refresh the look of controls that may rely on the fallback theme items.

public event Action FallbackChanged

Event Type

Action