Skip to main content

Module ui

Module ui 

Source
Expand description

Module containing all of the app’s UI.

UI is further split between individual modules, each covering a different aspect of the simulation (tracks, blocks …). The UI is managed via a central UiState. Each different window then has a separate state defined. Things like “close” buttons set the state back to UiState::Default with their respective windows reacting via DespawnOnExit. This means that only window “type” can be opened at a time.

TODO: Reactive UI. Most of the UI is static, meaning it won’t change when the world properties change.

Modules§

logical_blocks
target
track
train

Structs§

EditingWindow
Entities marked with this component should be treated as windows for editing different aspects of the simulation.
IsHoveringUi
Whether the user is hovering over any UI.
UiPlugin

Enums§

UiState
The central UI state.

Functions§

on_activate_logical_blocks
on_activate_trains
on_enter_default 🔒
setup_ui 🔒
toolbar