Skip to content
docsv0.3.0

SettingsListRenderer

Settings panel with value cycling, submenus, and a description footer. The TUI analog of pi-tui's `SettingsList`. Pure renderer: the caller owns `cursor`, the per-item `currentValue`, and which submenu (if any) is open; this renderer only paints the snapshot. Cycling values and opening submenus is the caller's job (key handler / live component), mirroring how every other renderer in this namespace is a pure node-in/frame-out mapping. Layout: › Theme dark Model gpt-4 Verbose on Theme: color scheme used for the dashboard. ⏎ change · esc cancel Each setting is `{id, label, currentValue, values?, description?}`. When `values` is non-empty, the value side shows the current option (and the caller cycles on Enter/Space). When `submenu` is set, the caller is responsible for swapping in a subtree — this renderer just shows the current value with a `›` marker to hint it opens something. Node props (all optional): - `settings` array List of setting items. - `cursor` int Index of the highlighted setting. Default: 0. - `maxVisible` int Rows to show before scrolling. Default: node height. - `showHint` bool Show the footer hint row. Default: true. - `showDescription` bool Show the selected item's description. Default: true. - `hint` string Override the hint text. Default: '⏎ change · esc cancel'. - `emptyText` string Message when the list is empty. Default: 'No settings'. - `focused` bool Override focus. Default: context.focused().

SettingsListRenderer::supports()

public function supports(Milpa\Live\ValueObjects\Tui\TuiNode $node): bool

True only for `settings-list` nodes — dispatch is by declared node type, never by where the node came from.

Parameters

Parameters of supports()
NameTypeDescription
$nodeMilpa\Live\ValueObjects\Tui\TuiNode

SettingsListRenderer::render()

public function render(Milpa\Live\ValueObjects\Tui\TuiNode $node, Milpa\Live\ValueObjects\Tui\TuiRenderContext $context): Milpa\Live\ValueObjects\Tui\TuiFrame

Draws the settings rows with their current values and the description of the highlighted row underneath.

Parameters

Parameters of render()
NameTypeDescription
$nodeMilpa\Live\ValueObjects\Tui\TuiNode
$contextMilpa\Live\ValueObjects\Tui\TuiRenderContext