swiftlys2/docs/api/ai/
API Reference Menus.OptionsBase

ButtonMenuOption

Class
Namespace: SwiftlyS2.Core.Menus.OptionsBase · Assembly: SwiftlyS2.CS2.dll
public sealed class ButtonMenuOption : MenuOptionBase, IMenuOption, IDisposable

Represents a clickable button menu option.

View source

Constructors

ButtonMenuOption(int, int)

Creates an instance of ButtonMenuOption with dynamic text updating capabilities.

public ButtonMenuOption(int updateIntervalMs = 120, int pauseIntervalMs = 1000)
Parameters
  • updateIntervalMsintoptionalThe interval in milliseconds between text updates. Defaults to 120ms.
  • pauseIntervalMsintoptionalThe pause duration in milliseconds before starting the next text update cycle. Defaults to 1000ms.

When using this constructor, the Text property must be manually set to specify the initial text.

ButtonMenuOption(string, int, int)

Creates an instance of ButtonMenuOption with dynamic text updating capabilities.

public ButtonMenuOption(string text, int updateIntervalMs = 120, int pauseIntervalMs = 1000)
Parameters
  • textstringThe text content to display.
  • updateIntervalMsintoptionalThe interval in milliseconds between text updates. Defaults to 120ms.
  • pauseIntervalMsintoptionalThe pause duration in milliseconds before starting the next text update cycle. Defaults to 1000ms.