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

MenuSelectionContext`1

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

Properties

IsSelected

Whether Item is now selected.

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

Item

The item that was ticked or unticked.

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

Player

The player who made the change.

public IPlayer Player { get; }
Property Value

Selected

Every selected item after the change.

public required IReadOnlyList<TItem> Selected { get; init; }
Property Value

Session

The session that changed the selection.

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