Class: StyleController

StyleController

Style controller manages LayoutSystem styles.

new StyleController (layout, styles)

Manages and sets all the styles of LayoutSystem

Name Type Attributes Description
layout LayoutSystem

LayoutSystem to be styled

styles Styles <optional>

styles to be applied

Members

hasConditionalStyles boolean

Returns true if there are conditional styles

opacity

Sets the opacity of the layout

opacity GradeToOne

Returns the opacity of the layout

textStyle Partial<PixiTextStyle>

Returns all pixi text related styles of the Layout

visible

Set visibility of the layout

visible boolean

Returns visibility of the layout

_textStyle Partial<PixiTextStyle> protected

Holds all text related styles. This is to be nested by children

conditionalStyles ConditionalStyles protected

Conditional styles

defaultStyles Styles protected

Stores default styles.

Methods

applyConditionalStyles ()

Checks and applies conditional styles basing on parent size

get (style) Styles[keyof]

Returns a style value by name.

Name Type Description
style keyof

name of the style

Returns:
Type Description
Styles[keyof]

getAll () Styles

Returns all styles of the Layout

Returns:
Type Description
Styles

set (styles)

Applies a list of styles for the layout.

Name Type Attributes Description
styles Styles <optional>

styles to be applied

separateConditionalStyles (styles) protected

Separates conditional styles from default styles

Name Type Attributes Description
styles Styles & ConditionalStyles <optional>

mixed styles