Jazz2::UI::Menu::StackLayout class

Vertical list that centers its children within its bounds.

Suitable for short menus that always fit on screen. Selection is moved with Up/Down/Fire and items can be tapped.

Base classes

class ListContainer
Base of vertical lists of selectable children.

Public functions

void Draw(IMenuContainer* root, Canvas* canvas, const Rectf& bounds, std::int32_t& charOffset) override
Draws the widget within the given bounds.
auto OnTouchEvent(const nCine::TouchEvent& event, Vector2i viewSize, IMenuContainer* root) -> bool override
Handles a touch event; returns true if it was consumed.

Public variables

bool Spread
When set, distributes the children across the full height (top-weighted) instead of centering them tightly.