logo SERENITY
Game Systems Foundation
Search Results for

    Show / Hide Table of Contents

    Namespace Serenity.Menu.Application.Cascade

    Classes

    CascadeColumn

    A single column of options within a CascadeMenuPage. A page with more than one column renders them side-by-side, all visible and interactable, with left/right navigation moving the cursor between columns (e.g. a target selector's "Enemies" and "Party" columns). Pure model.

    CascadeMenuBuilder

    Turns a tree of ICascadeMenuNode definitions into live CascadeMenuPages driving a CascadeMenuModel, resolving content/outcomes through an ICascadeMenuContext. Nodes call Push(ICascadeMenuNode) to descend and Resolve(object) to finish. Engine-agnostic and unit-testable.

    CascadeMenuModel

    Runtime-configurable navigable cascade menu. The whole stack stays "open": a renderer draws every level (each offset from its parent — see CascadeMenuPage), while only the top level is interactable. Up/down moves within the focused column; left/right moves between columns of a multi-column page (e.g. enemies⇄party, both visible); selecting descends or resolves; Cancel() pops to the parent (restoring its prior focus) and is a no-op at the base. Pure C# and engine-agnostic, so it is unit-testable. Renderers listen to Changed (structural — rebuild) and FocusChanged (cursor moved — re-tint only).

    CascadeMenuPage

    One page of a cascade menu: a title plus one or more CascadeColumns. Single-column pages are ordinary menus (command, magic, item); multi-column pages show all columns at once and are navigable between them (target selection = Enemies + Party).

    OffsetX/OffsetY (when HasOffset is true) define this page's position RELATIVE TO ITS PARENT page when cascaded — so each level's spacing is configurable, FF8-style. PreferredColumn is the column the cursor starts on (e.g. Party for an item's target step). All are plain values (no engine dependency) so a page can be authored from a ScriptableObject.

    CascadeOption

    One selectable entry in a CascadeMenuPage. Selecting it runs OnSelect, which typically either pushes a sub-page (descend the cascade) or resolves a terminal action. Pure model — no engine dependency, so it is unit-testable.

    Structs

    CascadeDynamicEntry

    One runtime-resolved entry for a dynamic menu column (a spell, an item, a target, …).

    Interfaces

    ICascadeMenuContext

    The bridge between data-authored menu definitions and the game. A definition describes the STRUCTURE (which menus, their offsets, which dynamic sources); the game supplies the CONTENT and handles the outcome through this context. Pure interface so menu building stays engine-agnostic and testable.

    ICascadeMenuNode

    A node in a cascade-menu definition tree. Implemented by typed menu definitions (commands, dynamic lists, target selectors, …); a CascadeMenuBuilder turns a node into a live CascadeMenuPage using the runtime ICascadeMenuContext. Pure interface, so the builder is engine-agnostic while the concrete nodes can be Unity ScriptableObjects. Extends IFoundationSettings so every authored node carries the standard Id/Guid identity.

    ICascadeViewService

    Registry of cascade views keyed by Id, exposed to the IViewRouter as an IViewProvider so a menu option can transition to a cascade view by Id — mirroring the role ICompositeViewService plays for composite views. Pure interface so the registry's contract is engine-agnostic; the Unity implementation registers views built from IViewBase.

    In this article
    © 2026 Serenity. All Rights Reserved