swiftlys2/docs/api/releases/features/ai/
API Reference › Menu.Components

MenuCollectionRowContext`1

Struct
Namespace: SwiftlyS2.Shared.Menu.Components · Assembly: SwiftlyS2.CS2.dll
public readonly record struct MenuCollectionRowContext<TItem> : IEquatable<MenuCollectionRowContext<TItem>>
View source

Properties

Index

The position of the item in the loaded list, from zero.

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

IsFocused

Whether the row holds the selection.

public required bool IsFocused { get; init; }
Property Value

Item

The item the row stands for.

public required TItem Item { get; init; }
Property Value
TItem

Player

The player who is looking at the menu.

public IPlayer Player { get; }
Property Value

Session

The session being drawn.

public required IMenuSession Session { get; init; }
Property Value

Translate

Translates a key for the player who is looking at the menu.

public required Func<string, string> Translate { get; init; }
Property Value