Theme

Inherits: Resource < Reference < Object

Theme for controls.

Description

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.

Tutorials

Properties

Fontdefault_font

Methods

voidclear ( )
voidclear_color ( String name, String node_type )
voidclear_constant ( String name, String node_type )
voidclear_font ( String name, String node_type )
voidclear_icon ( String name, String node_type )
voidclear_stylebox ( String name, String node_type )
voidcopy_default_theme ( )
voidcopy_theme ( Theme other )
Colorget_color ( String name, String node_type ) const
PoolStringArrayget_color_list ( String node_type ) const
intget_constant ( String name, String node_type ) const
PoolStringArrayget_constant_list ( String node_type ) const
Fontget_font ( String name, String node_type ) const
PoolStringArrayget_font_list ( String node_type ) const
Textureget_icon ( String name, String node_type ) const
PoolStringArrayget_icon_list ( String node_type ) const
StyleBoxget_stylebox ( String name, String node_type ) const
PoolStringArrayget_stylebox_list ( String node_type ) const
PoolStringArrayget_stylebox_types ( ) const
PoolStringArrayget_type_list ( String node_type ) const
boolhas_color ( String name, String node_type ) const
boolhas_constant ( String name, String node_type ) const
boolhas_font ( String name, String node_type ) const
boolhas_icon ( String name, String node_type ) const
boolhas_stylebox ( String name, String node_type ) const
voidset_color ( String name, String node_type, Color color )
voidset_constant ( String name, String node_type, int constant )
voidset_font ( String name, String node_type, Font font )
voidset_icon ( String name, String node_type, Texture texture )
voidset_stylebox ( String name, String node_type, StyleBox texture )

Property Descriptions

Setterset_default_font(value)
Getterget_default_font()

The theme’s default font.

Method Descriptions

  • void clear ( )

Clears all values on the theme.


Clears the Color at name if the theme has node_type.


Clears the constant at name if the theme has node_type.


Clears the Font at name if the theme has node_type.


Clears the icon at name if the theme has 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 ( Theme other )

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


Returns the Color at name if the theme has node_type.


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


Returns the constant at name if the theme has node_type.


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


Returns the Font at name if the theme has node_type.


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


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


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


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


Returns all the StyleBoxs as a PoolStringArray filled with each StyleBox‘s name, for use in get_stylebox, if the theme has node_type.


Returns all the StyleBox types as a PoolStringArray filled with each StyleBox‘s type, for use in get_stylebox and/or get_stylebox_list, if the theme has 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.


Returns true if Color with name is in node_type.

Returns false if the theme does not have node_type.


Returns true if constant with name is in node_type.

Returns false if the theme does not have node_type.


Returns true if Font with name is in node_type.

Returns false if the theme does not have node_type.


Returns true if icon Texture with name is in node_type.

Returns false if the theme does not have node_type.


Returns true if StyleBox with name is in node_type.

Returns false if the theme does not have node_type.


Sets the theme’s Color 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.


Sets the theme’s Font to font at name in node_type.

Does nothing if the theme does not have node_type.


Sets the theme’s icon Texture to texture at name in node_type.

Does nothing if the theme does not have node_type.


Sets theme’s StyleBox to stylebox at name in node_type.

Does nothing if the theme does not have node_type.