UI Events and Controls
Runtime and core frontend coordinate through explicit UI control and event contracts.
Core Controls
- Start game.
- Pause/resume.
- Sound toggle.
- Exit game.
Runtime-to-Parent Events
Typical event categories:
- Runtime exit requested.
- Token refresh required.
- Session state notifications.
Parent-to-Runtime Bootstrap
Parent sends startup context such as:
- Session identifier.
- Token payload.
- Mode context (play or spectate).
UX Integrity Rules
- Exit should always return control cleanly to core UI.
- Token refresh should avoid hard runtime reset where possible.
- HUD state should reflect authoritative data, not stale local assumptions.
