ui Folder
Folders Index
| folder | binding |
| folder | commands |
| folder | layout |
| folder | transform |
| folder | widgets |
Files Index
| file | helios/engine/modules/ui/_module.ixx |
|
Module facade for UI components and systems. More... | |
| file | modules/ui/registry.ixx |
|
Component registration for entire UI module. More... | |
| file | UiActionCommandHandler.ixx |
|
Interface for UI action command handlers. More... | |
| file | UiActionCommandManager.ixx |
|
Manager for processing UI action commands. More... | |
Description
helios::engine::modules::ui
User interface components and systems for game entities.
This module provides components and systems for creating and managing UI elements within the helios engine. It supports viewport-relative positioning, text rendering, menus, and data binding between game state and UI components.
Submodules
| Submodule | Purpose |
|---|---|
| binding/ | Systems for binding game data to UI components |
| commands/ | UI action commands and dispatchers |
| layout/ | Layout primitives such as anchors and alignment |
| transform/ | UI-specific transform components and positioning systems |
| widgets/ | UI widget components (menus, text, etc.) and related systems |
Key Classes
| Class | Purpose |
|---|---|
| Anchor | Enum defining anchor points for UI positioning |
| UiTransformComponent | Viewport-relative positioning with anchor and margin support |
| UiTransformSystem | Computes UI element positions based on viewport and anchor |
| MenuComponent | Manages menu items and selection state |
| UiTextComponent | Text display with template-based formatting |
| UiStateComponent | Tracks interaction states (selected, hovered, focused) |
| UiStyleComponent | Defines colors and scales for different states |
| UiFocusComponent | Tracks the currently focused UI entity |
| UiActionComponent | Associates actions with UI elements |
| UiActionCommand | Command for triggering UI actions |
| UiActionCommandManager | Processes UI action commands with policy-based dispatch |
| MenuNavigationSystem | Handles gamepad input for menu navigation |
| UiStyleUpdateSystem | Applies styles based on interaction state |
| UiTextBoundsUpdateSystem | Updates AABB bounds when text content changes |
| Score2UiTextUpdateSystem | Binds score data to UI text components |
Architecture
The UI module follows the ECS pattern used throughout helios:
1. Components store UI-specific state (anchors, offsets, text content, interaction state) 2. Systems process components each frame to update positions, styling, and content 3. Commands handle UI actions (button presses, menu selections) 4. Bindings connect game state (e.g., scores) to UI widgets
UI elements are positioned relative to viewports using anchors and offsets, allowing for resolution-independent layouts.
Generated via doxygen2docusaurus 2.0.0 by Doxygen 1.15.0.