docs
Systems
Presentation
UISystem
UISystem Overview

The UISystem is the UI domain's presentation layer in SaffronLibrary. It defines the verbs, subjects, parameter keys, and factories that UI components use to send commands to the UI domain and raise UI events on the event bus.

The system exists so that UI code never builds commands or events by hand. It:

  • Provides UICommandFactory to register UI components with the UI flow controller.
  • Provides UIEventFactory to raise standard UI events such as pointer clicks, button clicks, and page open or close notices.
  • Defines the UI-specific verbs, subjects, and typed parameter keys that give those messages a shared vocabulary.
  • Supplies the base classes UIRoot (for MonoBehaviour UI components) and UIFlowController (for the project-level UI domain controller).

Use this system if you are building UI components, screens, or popups in a project that uses SaffronLibrary, or if you are writing the project-specific UI flow controller. Gameplay and other domain code should send UI commands and listen for UI events through these factories rather than constructing UI messages directly.

The system depends on the Contracts system (for Domain, CoreParamKeys, and the core verbs), the Params system (for typed keys), the Commands and Events messaging systems, the Bus system (for BusUtility), and the Flow system (for FlowController). These dependencies are described in the architecture and components documents.