This class contains all data related to the element's style.

  • To learn more about how to create custom themes, please take a look at Wiki: Themes.

  • To get an overview of what the different variables do in detail, please refer to Wiki: Elements.

Static variables

staticread onlyrequiredAssets:Array<String>

Names of assets that are required by the theme.

Static methods

@:value({ state : "default" })staticinlinegetStyle(tID:String, state:String = "default"):Null<Style>

Return the style object for the given tID, or null if it does not exist.

staticinlinemakeOverride(styleGroup:Dynamic, overrideProp:String, newValue:Dynamic):Dynamic

Override a property from the style.

Parameters:

styleGroup

The group, e.g. style.color

overrideProp

The name of the property inside that group

newValue

The new value

Returns:

The old, overridden value (to undo the override later)

See also:

staticinlinewithOverride(styleGroup:Dynamic, overrideProp:String, newValue:Dynamic, action:() ‑> Void):Void

Python-like context manager to execute the given function while overriding a property from the style. After the execution, the property is reset to its state before calling this function.

Parameters:

styleGroup

The group, e.g. style.color

overrideProp

The name of the property inside that group

newValue

The new value

action

Function to execute while the override is active

See also:

Variables

atlas:{y:Int, x:Int, w:Int, h:Int}

border:{style:String, size:Int, nineSlice:Bool, color:Color}

checkbox:Null<{useAutoPadding:Bool}>

color:{useGradient:Bool, text:Color, gradient:Null<{direction:Bool, colorTopLeft:Color, colorBottomRight:Color}>, bg:Color}

@:value(0)cornerRadius:Int = 0

cursors:{notallowed:String, defaultCursor:String}

dropShadow:{radius:Int, falloff:Float, color:Color}

dropdown:Null<{separatorSize:Int, separatorColor:Color, arrowSize:Int, arrowRight:Bool, arrowColor:Color}>

font:{underlineThickness:Int, size:Int, family:String}

margin:{top:Int, right:Int, left:Int, bottom:Int}

@:value(0.)opacity:Float = 0.

@:value("")orientation:String = ""

padding:{top:Int, right:Int, left:Int, bottom:Int}

scrollbar:Null<{width:Int, color:{frontHover:Color, frontClick:Color, front:Color, corner:Color, bg:Color}}>

size:{width:Int, minWidth:Int, minHeight:Int, maxWidth:Int, maxHeight:Int, height:Int}

slider:Null<{textOffsetY:Int, textOffsetX:Int, showValue:Bool, showRange:Bool, buttonWidth:Int, buttonTexture:Null<{image:String, atlasY:Int, atlasX:Int, atlasW:Int, atlasH:Int}>}>

textShadow:Null<{offsetY:Int, offsetX:Int, color:Color}>

textinput:Null<{colorSelection:Color, colorLabel:Color, colorCursor:Color, blinkInterval:Int}>

@:value("")textureBg:String = ""