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

MenuValueChangedContext`1

Struct
Namespace: SwiftlyS2.Shared.Menu.Components · Assembly: SwiftlyS2.CS2.dll
public readonly record struct MenuValueChangedContext<TValue> : IEquatable<MenuValueChangedContext<TValue>>

Describes a value one player changed on a component.

View source

Properties

Component

The component that changed.

public required IMenuComponent Component { get; init; }
Property Value

NewValue

The value after the change.

public required TValue NewValue { get; init; }
Property Value
TValue

OldValue

The value before the change.

public required TValue OldValue { get; init; }
Property Value
TValue

Player

The player who made the change.

public IPlayer Player { get; }
Property Value

Session

The session the value belongs to.

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