Theme for controls.
    public class Theme : Resource

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.

Inheritance Chain

Constructors

    public Theme()

Properties

    public Font DefaultFont { get; set; }

The theme’s default font.

Methods

    public void ClearColor(string name, string type)

Clears theme Color at name if Theme has type.

    public void ClearConstant(string name, string type)

Clears theme constant at name if Theme has type.

    public void ClearFont(string name, string type)

Clears Font at name if Theme has type.

    public void ClearIcon(string name, string type)

Clears icon at name if Theme has type.

    public void ClearStylebox(string name, string type)

Clears StyleBox at name if Theme has type.

    public void CopyDefaultTheme()

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

    public Color GetColor(string name, string type)

Returns the Color at name if Theme has type.

    public string[] GetColorList(string type)

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

    public int GetConstant(string name, string type)

Returns the constant at name if Theme has type.

    public string[] GetConstantList(string type)

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

    public Font GetDefaultFont()

Getter for DefaultFont

    public Font GetFont(string name, string type)

Returns the Font at name if Theme has type.

    public string[] GetFontList(string type)

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

    public Texture GetIcon(string name, string type)

Returns the icon Texture at name if Theme has type.

    public string[] GetIconList(string type)

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

    public StyleBox GetStylebox(string name, string type)

Returns the icon StyleBox at name if Theme has type.

    public string[] GetStyleboxList(string type)

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

    public string[] GetStyleboxTypes()

Returns all of the StyleBox types as a PoolStringArray filled with each StyleBox’s type, for use in GetStylebox(string, string) and/or GetStyleboxList(string), if Theme has type.

    public string[] GetTypeList(string type)

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

    public bool HasColor(string name, string type)

Returns true if Color with name is in type.

Returns false if Theme does not have type.

    public bool HasConstant(string name, string type)

Returns true if constant with name is in type.

Returns false if Theme does not have type.

    public bool HasFont(string name, string type)

Returns true if Font with name is in type.

Returns false if Theme does not have type.

    public bool HasIcon(string name, string type)

Returns true if icon Texture with name is in type.

Returns false if Theme does not have type.

    public bool HasStylebox(string name, string type)

Returns true if StyleBox with name is in type.

Returns false if Theme does not have type.

    public void SetColor(string name, string type, Color color)

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

Does nothing if Theme does not have type.

    public void SetConstant(string name, string type, int constant)

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

Does nothing if Theme does not have type.

    public void SetDefaultFont(Font font)

Setter for DefaultFont

    public void SetFont(string name, string type, Font font)

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

Does nothing if Theme does not have type.

    public void SetIcon(string name, string type, Texture texture)

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

Does nothing if Theme does not have type.

    public void SetStylebox(string name, string type, StyleBox texture)

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

Does nothing if Theme does not have type.

Tags: