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 ; the Control and its children will automatically use it.
Theme resources can alternatively be loaded by writing them in a file, see the documentation for more information.
Tutorials
Methods
- default_font
The theme’s default font.
Method Descriptions
- void clear ( )
Clears all values on the theme.
- void clear_color ( String name, node_type )
Clears the Color at name
if the theme has node_type
.
- void clear_constant ( name, String node_type )
Clears the constant at name
if the theme has node_type
.
- void clear_font ( name, String node_type )
Clears the at name
if the theme has node_type
.
Clears the icon at name
if the theme has node_type
.
- void clear_stylebox ( String name, node_type )
Clears StyleBox at name
if the theme has node_type
.
- void copy_default_theme ( )
Sets the theme’s values to a copy of the default theme values.
- void copy_theme ( other )
Sets the theme’s values to a copy of a given theme.
Returns the at name
if the theme has node_type
.
- PoolStringArray get_color_list ( node_type ) const
Returns all the Colors as a filled with each Color‘s name, for use in , if the theme has node_type
.
- get_constant_list ( String node_type ) const
Returns all the constants as a filled with each constant’s name, for use in get_constant, if the theme has node_type
.
- get_font ( String name, node_type ) const
Returns the Font at name
if the theme has node_type
.
- get_font_list ( String node_type ) const
Returns all the s as a PoolStringArray filled with each ‘s name, for use in get_font, if the theme has node_type
.
- get_icon ( String name, node_type ) const
Returns the icon Texture at name
if the theme has node_type
.
- get_icon_list ( String node_type ) const
Returns all the icons as a filled with each Texture‘s name, for use in , if the theme has node_type
.
Returns the icon at name
if the theme has node_type
.
Returns all the StyleBoxs as a filled with each StyleBox‘s name, for use in , if the theme has .
- PoolStringArray get_stylebox_types ( ) const
Returns all the types as a PoolStringArray filled with each ‘s type, for use in get_stylebox and/or , if the theme has node_type
.
- PoolStringArray get_type_list ( node_type ) const
Returns all the types in node_type
as a PoolStringArray for use in any of the get_*
functions, if the theme has node_type
.
- has_color ( String name, node_type ) const
Returns true
if Color with name
is in node_type
.
Returns false
if the theme does not have node_type
.
- has_constant ( String name, node_type ) const
Returns true
if constant with name
is in node_type
.
Returns false
if the theme does not have node_type
.
Returns true
if with name
is in node_type
.
Returns true
if icon with name
is in node_type
.
Returns false
if the theme does not have node_type
.
Returns if with name
is in node_type
.
Returns false
if the theme does not have node_type
.
Sets the theme’s to color
at name
in node_type
.
Does nothing if the theme does not have node_type
.
Sets the theme’s constant to constant
at name
in node_type
.
Does nothing if the theme does not have node_type
.
- void set_font ( name, String node_type, font )
Sets the theme’s Font to font
at name
in node_type
.
Does nothing if the theme does not have node_type
.
- void set_icon ( name, String node_type, texture )
Sets the theme’s icon Texture to texture
at name
in node_type
.
Does nothing if the theme does not have node_type
.
- void set_stylebox ( name, String node_type, texture )
Sets theme’s StyleBox to stylebox
at name
in node_type
.
Does nothing if the theme does not have node_type
.