UserInterface<T> class

A simple modal user interface layer.

It maintains a stack of screens. All screens in the stack update. Screens may indicate if they are opaque or transparent. Transparent screens allow the screen under them to render.

In addition, the interface can define a number of global KeyBindings which screens can use to map raw keypresses to something higher-level.

Constructors

UserInterface([RenderableTerminal? _terminal])

Properties

handlingInput bool
Whether or not the UI is listening for keyboard events.
getter/setter pair
hashCode int
The hash code for this object.
no setterinherited
keyPress KeyBindings<T>
Keyboard bindings for key press events.
final
running bool
Whether or not the game loop is running and the UI is refreshing itself every frame.
getter/setter pair
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

dirty() → void
goTo(Screen<T> screen) → void
Switches the current top screen to screen.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
pop([Object? result]) → void
Pops the top screen off the top of the stack.
push(Screen<T> screen) → void
Pushes screen onto the top of the stack.
refresh() → void
setTerminal(RenderableTerminal? terminal) → void
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited