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

MenuActionDescriptor

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

Declares a bindable menu action along with the key it uses when nothing overrides it.

Descriptors are the only place an action is defined. Nothing in the framework hardcodes a key, which is what lets plugins add and remove actions at runtime.

View source

Properties

DefaultKey

The key used when neither the global nor the plugin configuration binds this action.

public required MenuKey DefaultKey { get; init; }
Property Value

Id

The identity of this action.

public required MenuActionId Id { get; init; }
Property Value

Label

The label shown for this action in a menu footer. Falls back to Name when null.

public string? Label { get; init; }
Property Value

Order

Relative ordering of this action within a footer. Lower sorts first.

public int Order { get; init; }
Property Value

ShowInFooter

Whether renderers should advertise this action in the menu footer.

public bool ShowInFooter { get; init; }
Property Value