swiftlys2/docs/api/releases/features/ai/
API Reference › Menus

MenuExtraButton

Class
Namespace: SwiftlyS2.Shared.Menus · Assembly: SwiftlyS2.CS2.dll
[Obsolete("The classic menu system is deprecated and will be removed in future versions. Use Core.Menu (IMenuService) instead.")]
public sealed class MenuExtraButton
Inherits object

Represents an extra button in the menu that executes a custom action when pressed.

View source

Properties

Action

The action to execute when this button is pressed.

public required Action<IPlayer, IMenuAPI> Action { get; init; }
Property Value

KeyBind

The key binding for this extra button.

public required KeyBind KeyBind { get; init; }
Property Value

Label

The label to display for this button in the menu footer.

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