Struct Theme

Theme for controls.

struct Theme ;

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.

Properties

NameTypeDescription
defaultFont[get, set] FontThe theme's default font.

Methods

NameDescription
_emitThemeChanged
clear Clears all values on the theme.
clearColor Clears the Color at name if the theme has type.
clearConstant Clears the constant at name if the theme has type.
clearFont Clears the Font at name if the theme has type.
clearIcon Clears the icon at name if the theme has type.
clearStylebox Clears StyleBox at name if the theme has type.
copyDefaultTheme Sets the theme's values to a copy of the default theme values.
copyTheme Sets the theme's values to a copy of a given theme.
getColor Returns the Color at name if the theme has type.
getColorList Returns all the Colors as a PoolStringArray filled with each Color's name, for use in getColor, if the theme has type.
getConstant Returns the constant at name if the theme has type.
getConstantList Returns all the constants as a PoolStringArray filled with each constant's name, for use in getConstant, if the theme has type.
getDefaultFont
getFont Returns the Font at name if the theme has type.
getFontList Returns all the Fonts as a PoolStringArray filled with each Font's name, for use in getFont, if the theme has type.
getIcon Returns the icon Texture at name if the theme has type.
getIconList Returns all the icons as a PoolStringArray filled with each Texture's name, for use in getIcon, if the theme has type.
getStylebox Returns the icon StyleBox at name if the theme has type.
getStyleboxList Returns all the StyleBoxs as a PoolStringArray filled with each StyleBox's name, for use in getStylebox, if the theme has type.
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 type.
getTypeList Returns all the types in type as a PoolStringArray for use in any of the get_* functions, if the theme has type.
hasColor Returns true if Color with name is in type. Returns false if the theme does not have type.
hasConstant Returns true if constant with name is in type. Returns false if the theme does not have type.
hasFont Returns true if Font with name is in type. Returns false if the theme does not have type.
hasIcon Returns true if icon Texture with name is in type. Returns false if the theme does not have type.
hasStylebox Returns true if StyleBox with name is in type. Returns false if the theme does not have type.
setColor Sets the theme's Color to color at name in type. Does nothing if the theme does not have type.
setConstant Sets the theme's constant to constant at name in type. Does nothing if the theme does not have type.
setDefaultFont
setFont Sets the theme's Font to font at name in type. Does nothing if the theme does not have type.
setIcon Sets the theme's icon Texture to texture at name in type. Does nothing if the theme does not have type.
setStylebox Sets theme's StyleBox to stylebox at name in type. Does nothing if the theme does not have type.