Class ThemeDB
- 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.
public static class ThemeDB
- Inheritance
-
ThemeDB
- 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 static float FallbackBaseScale { get; set; }
Property Value
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 static Font FallbackFont { get; set; }
Property Value
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 static int FallbackFontSize { get; set; }
Property Value
FallbackIcon
The fallback icon of every Control node and Theme resource. Used when no other value is available to the control.
public static Texture2D FallbackIcon { get; set; }
Property Value
FallbackStylebox
The fallback stylebox of every Control node and Theme resource. Used when no other value is available to the control.
public static StyleBox FallbackStylebox { get; set; }
Property Value
Singleton
public static ThemeDBInstance Singleton { get; }
Property Value
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 static Theme GetDefaultTheme()
Returns
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 static Theme GetProjectTheme()
Returns
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 static event Action FallbackChanged