Theme

Inherits: Resource < Reference < Object

Category: Core

Brief Description

Theme for controls.

Properties

Fontdefault_font

Methods

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

Description

Theme for skinning controls. Controls can be skinned individually, but for complex applications it’s more efficient to just create a global theme that defines everything. This theme can be applied to any Control, and it and its children will automatically use it.

Theme resources can be alternatively loaded by writing them in a .theme file, see docs for more info.

Tutorials

Property Descriptions

Setterset_default_font(value)
Getterget_default_font()

The theme’s default font.

Method Descriptions

  • void clear ( )

Clears theme Color at name if Theme has type.


Clears theme constant at name if Theme has type.


Clears Font at name if Theme has type.


Clears icon at name if Theme has type.


Clears StyleBox at name if Theme has type.


  • void copy_default_theme ( )

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


  • void copy_theme ( Theme other )

Returns the Color at name if Theme has type.


Returns all of the Colors as a PoolStringArray filled with each Color’s name, for use in get_color, if Theme has type.


Returns the constant at name if Theme has type.


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


Returns the Font at name if Theme has type.


Returns all of the Fonts as a PoolStringArray filled with each Font’s name, for use in get_font, if Theme has type.


Returns the icon Texture at name if Theme has type.


Returns all of the icons as a PoolStringArray filled with each Texture’s name, for use in get_icon, if Theme has type.


Returns the icon StyleBox at name if Theme has type.


Returns all of the StyleBoxs as a PoolStringArray filled with each StyleBox’s name, for use in get_stylebox, if Theme has type.


Returns all of the StyleBox types as a PoolStringArray filled with each StyleBox’s type, for use in get_stylebox and/or get_stylebox_list, if Theme has type.


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


Returns true if Color with name is in type.

Returns false if Theme does not have type.


Returns true if constant with name is in type.

Returns false if Theme does not have type.


Returns true if Font with name is in type.

Returns false if Theme does not have type.


Returns true if icon Texture with name is in type.

Returns false if Theme does not have type.


Returns true if StyleBox with name is in type.

Returns false if Theme does not have type.


Sets Theme’s Color to color at name in type.

Does nothing if Theme does not have type.


Sets Theme’s constant to constant at name in type.

Does nothing if Theme does not have type.


Sets Theme’s Font to font at name in type.

Does nothing if Theme does not have type.


Sets Theme’s icon Texture to texture at name in type.

Does nothing if Theme does not have type.


Sets Theme’s StyleBox to stylebox at name in type.

Does nothing if Theme does not have type.