swiftlys2/docs/api/ai/
API Reference › Menu

MenuFrame

Class
Namespace: SwiftlyS2.Shared.Menu · Assembly: SwiftlyS2.CS2.dll
public sealed record MenuFrame : IEquatable<MenuFrame>
Inherits object

One fully composed, ready to draw snapshot of a menu for a single player.

The frame is the boundary between menu logic and rendering. By the time a renderer sees it, component selection, focus and paging have already been resolved, so a renderer only has to turn nodes into output.

View source

Properties

Body

The scrollable nodes, already reduced to the visible page.

public required IReadOnlyList<MenuNode> Body { get; init; }
Property Value

Header

Pinned nodes drawn above the body.

public required IReadOnlyList<MenuNode> Header { get; init; }
Property Value

PageOffset

The index of the first visible body entry within the full component list.

public required int PageOffset { get; init; }
Property Value

TotalItems

The total number of focusable body entries across all pages.

public required int TotalItems { get; init; }
Property Value