ThemeDB

package
v0.0.0-...-f11f688 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 25, 2025 License: MIT Imports: 28 Imported by: 0

Documentation

Overview

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.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Advanced

func Advanced() class

Advanced exposes a 1:1 low-level instance of the class, undocumented, for those who know what they are doing.

func FallbackBaseScale

func FallbackBaseScale() Float.X

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

See also Theme.DefaultBaseScale.

func FallbackFont

func FallbackFont() Font.Instance

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

See also Theme.DefaultFont.

func FallbackFontSize

func FallbackFontSize() int

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

See also Theme.DefaultFontSize.

func FallbackIcon

func FallbackIcon() Texture2D.Instance

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

func FallbackStylebox

func FallbackStylebox() StyleBox.Instance

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

func GetDefaultTheme

func GetDefaultTheme() Theme.Instance

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.

func GetProjectTheme

func GetProjectTheme() Theme.Instance

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".

func OnFallbackChanged

func OnFallbackChanged(cb func(), flags ...Signal.Flags)

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.

func SetFallbackBaseScale

func SetFallbackBaseScale(value Float.X)

SetFallbackBaseScale sets the property returned by [GetFallbackBaseScale].

func SetFallbackFont

func SetFallbackFont(value Font.Instance)

SetFallbackFont sets the property returned by [GetFallbackFont].

func SetFallbackFontSize

func SetFallbackFontSize(value int)

SetFallbackFontSize sets the property returned by [GetFallbackFontSize].

func SetFallbackIcon

func SetFallbackIcon(value Texture2D.Instance)

SetFallbackIcon sets the property returned by [GetFallbackIcon].

func SetFallbackStylebox

func SetFallbackStylebox(value StyleBox.Instance)

SetFallbackStylebox sets the property returned by [GetFallbackStylebox].

Types

type Extension

type Extension[T gdclass.Interface] struct{ gdclass.Extension[T, Instance] }

Extension can be embedded in a new struct to create an extension of this class. T should be the type that is embedding this Extension

func (*Extension[T]) AsObject

func (self *Extension[T]) AsObject() [1]gd.Object

type ID

type ID Object.ID

ID is a typed object ID (reference) to an instance of this class, use it to store references to objects with unknown lifetimes, as an ID will not panic on use if the underlying object has been destroyed.

func (ID) Instance

func (id ID) Instance() (Instance, bool)

type Instance

type Instance [1]gdclass.ThemeDB

Instance of the class with convieniently typed arguments and results.

func (Instance) AsObject

func (self Instance) AsObject() [1]gd.Object

func (Instance) ID

func (self Instance) ID() ID

func (*Instance) SetObject

func (self *Instance) SetObject(obj [1]gd.Object) bool

func (Instance) Virtual

func (self Instance) Virtual(name string) reflect.Value

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL