Theme

Theme for controls.

A theme for skinning controls. Controls can be skinned individually, but for complex applications, it's more practical to just create a global theme that defines everything. This theme can be applied to any Control; the Control and its children will automatically use it. Theme resources can alternatively be loaded by writing them in a .theme file, see the documentation for more information.

@GodotBaseClass
struct Theme {}

Members

Aliases

BaseClasses
alias BaseClasses = AliasSeq!(typeof(_GODOT_base), typeof(_GODOT_base).BaseClasses)
Undocumented in source.

Functions

_emitThemeChanged
void _emitThemeChanged()
clear
void clear()

Clears all values on the theme.

clearColor
void clearColor(String name, String node_type)

Clears the Color at name if the theme has node_type.

clearConstant
void clearConstant(String name, String node_type)

Clears the constant at name if the theme has node_type.

clearFont
void clearFont(String name, String node_type)

Clears the Font at name if the theme has node_type.

clearIcon
void clearIcon(String name, String node_type)

Clears the icon at name if the theme has node_type.

clearStylebox
void clearStylebox(String name, String node_type)

Clears StyleBox at name if the theme has node_type.

copyDefaultTheme
void copyDefaultTheme()

Sets the theme's values to a copy of the default theme values.

copyTheme
void copyTheme(Theme other)

Sets the theme's values to a copy of a given theme.

getColor
Color getColor(String name, String node_type)

Returns the Color at name if the theme has node_type.

getColorList
PoolStringArray getColorList(String node_type)

Returns all the Colors as a PoolStringArray filled with each Color's name, for use in getColor, if the theme has node_type.

getConstant
long getConstant(String name, String node_type)

Returns the constant at name if the theme has node_type.

getConstantList
PoolStringArray getConstantList(String node_type)

Returns all the constants as a PoolStringArray filled with each constant's name, for use in getConstant, if the theme has node_type.

getDefaultFont
Ref!Font getDefaultFont()
getFont
Ref!Font getFont(String name, String node_type)

Returns the Font at name if the theme has node_type.

getFontList
PoolStringArray getFontList(String node_type)

Returns all the Fonts as a PoolStringArray filled with each Font's name, for use in getFont, if the theme has node_type.

getIcon
Ref!Texture getIcon(String name, String node_type)

Returns the icon Texture at name if the theme has node_type.

getIconList
PoolStringArray getIconList(String node_type)

Returns all the icons as a PoolStringArray filled with each Texture's name, for use in getIcon, if the theme has node_type.

getStylebox
Ref!StyleBox getStylebox(String name, String node_type)

Returns the StyleBox at name if the theme has node_type. Valid names may be found using getStyleboxList. Valid node_types may be found using getStyleboxTypes.

getStyleboxList
PoolStringArray getStyleboxList(String node_type)

Returns all the StyleBoxs as a PoolStringArray filled with each StyleBox's name, for use in getStylebox, if the theme has node_type. Valid node_types may be found using getStyleboxTypes.

getStyleboxTypes
PoolStringArray getStyleboxTypes()

Returns all the StyleBox types as a PoolStringArray filled with each StyleBox's type, for use in getStylebox and/or getStyleboxList, if the theme has node_type.

getTypeList
PoolStringArray getTypeList(String node_type)

Returns all the types in node_type as a PoolStringArray for use in any of the get_* functions, if the theme has node_type.

hasColor
bool hasColor(String name, String node_type)

Returns true if Color with name is in node_type. Returns false if the theme does not have node_type.

hasConstant
bool hasConstant(String name, String node_type)

Returns true if constant with name is in node_type. Returns false if the theme does not have node_type.

hasFont
bool hasFont(String name, String node_type)

Returns true if Font with name is in node_type. Returns false if the theme does not have node_type.

hasIcon
bool hasIcon(String name, String node_type)

Returns true if icon Texture with name is in node_type. Returns false if the theme does not have node_type.

hasStylebox
bool hasStylebox(String name, String node_type)

Returns true if StyleBox with name is in node_type. Returns false if the theme does not have node_type.

opAssign
typeof(null) opAssign(typeof(null) n)
opEquals
bool opEquals(Theme other)
opEquals
bool opEquals(typeof(null) n)
setColor
void setColor(String name, String node_type, Color color)

Sets the theme's Color to color at name in node_type. Does nothing if the theme does not have node_type.

setConstant
void setConstant(String name, String node_type, long constant)

Sets the theme's constant to constant at name in node_type. Does nothing if the theme does not have node_type.

setDefaultFont
void setDefaultFont(Font font)
setFont
void setFont(String name, String node_type, Font font)

Sets the theme's Font to font at name in node_type. Does nothing if the theme does not have node_type.

setIcon
void setIcon(String name, String node_type, Texture texture)

Sets the theme's icon Texture to texture at name in node_type. Does nothing if the theme does not have node_type.

setStylebox
void setStylebox(String name, String node_type, StyleBox texture)

Sets theme's StyleBox to stylebox at name in node_type. Does nothing if the theme does not have node_type.

toHash
size_t toHash()

Mixins

__anonymous
mixin baseCasts
Undocumented in source.

Properties

defaultFont
Font defaultFont [@property getter]
Font defaultFont [@property setter]

The theme's default font.

Static functions

_new
Theme _new()

Construct a new instance of Theme. Note: use memnew!Theme instead.

Static variables

_classBindingInitialized
bool _classBindingInitialized;
Undocumented in source.

Structs

GDNativeClassBinding
struct GDNativeClassBinding
Undocumented in source.

Unions

__anonymous
union __anonymous
Undocumented in source.

Variables

_GODOT_internal_name
enum string _GODOT_internal_name;
Undocumented in source.

Mixed In Members

From mixin baseCasts

as
inout(To) as()
Undocumented in source. Be warned that the author may not have intended to support it.
as
inout(To) as()
Undocumented in source. Be warned that the author may not have intended to support it.
as
inout(ToRef) as()
Undocumented in source. Be warned that the author may not have intended to support it.
opCast
template opCast(To)
Undocumented in source.
opCast
template opCast(To)
Undocumented in source.
opCast
template opCast(ToRef)
Undocumented in source.
opCast
void* opCast()
Undocumented in source. Be warned that the author may not have intended to support it.
opCast
godot_object opCast()
Undocumented in source. Be warned that the author may not have intended to support it.
opCast
bool opCast()
Undocumented in source. Be warned that the author may not have intended to support it.

Meta