GUI Style

class arcade.gui.UIStyleBase[source]


Base class for styles to ensure a general interface and implement additional magic.

Support dict like access syntax.

A styled widget should own a dataclass, which subclasses this class

get(key, default: str) str[source]
get(key, default: Any) Any
class arcade.gui.UIStyledWidget(*, style: Mapping[str, StyleRef], **kwargs)[source]

Bases: UIWidget, Generic[StyleRef]

abstract get_current_state() str[source]

Return the current state of the widget. These should be contained in the style dict.

Well known states: - normal - hover - press - disabled

get_current_style() StyleRef[source]

Return style based on any state of the widget

style: Mapping

Property that represents a dict. Only dict are allowed. Any other classes are forbidden.