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 ¶
- func Advanced() class
- func FallbackBaseScale() Float.X
- func FallbackFont() Font.Instance
- func FallbackFontSize() int
- func FallbackIcon() Texture2D.Instance
- func FallbackStylebox() StyleBox.Instance
- func GetDefaultTheme() Theme.Instance
- func GetProjectTheme() Theme.Instance
- func OnFallbackChanged(cb func(), flags ...Signal.Flags)
- func SetFallbackBaseScale(value Float.X)
- func SetFallbackFont(value Font.Instance)
- func SetFallbackFontSize(value int)
- func SetFallbackIcon(value Texture2D.Instance)
- func SetFallbackStylebox(value StyleBox.Instance)
- type Extension
- type ID
- type Instance
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 ¶
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 ¶
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 ¶
The fallback icon of every Control node and Theme resource. Used when no other value is available to the control.
func FallbackStylebox ¶
The fallback stylebox of every Control node and Theme resource. Used when no other value is available to the control.
func 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.
func 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".
func OnFallbackChanged ¶
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 ¶
SetFallbackBaseScale sets the property returned by [GetFallbackBaseScale].
func SetFallbackFont ¶
SetFallbackFont sets the property returned by [GetFallbackFont].
func SetFallbackFontSize ¶
func SetFallbackFontSize(value int)
SetFallbackFontSize sets the property returned by [GetFallbackFontSize].
func SetFallbackIcon ¶
SetFallbackIcon sets the property returned by [GetFallbackIcon].
func SetFallbackStylebox ¶
SetFallbackStylebox sets the property returned by [GetFallbackStylebox].
Types ¶
type Extension ¶
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
type 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.