SubmenuMenuOption
Class SubmenuMenuOption
Namespace: SwiftlyS2.Core.Menus.OptionsBase
Assembly: SwiftlyS2.CS2.dll
Represents a menu option that opens a submenu when clicked.
public sealed class SubmenuMenuOption : MenuOptionBase, IMenuOption, IDisposableInheritance
Implements
Inherited Members
- MenuOptionBase.Dispose()
- MenuOptionBase.PauseTextAnimation()
- MenuOptionBase.ResumeTextAnimation()
- MenuOptionBase.Menu
- MenuOptionBase.LineCount
- MenuOptionBase.BindingText
- MenuOptionBase.Text
- MenuOptionBase.Comment
- MenuOptionBase.MaxWidth
- MenuOptionBase.Visible
- MenuOptionBase.Enabled
- MenuOptionBase.CloseAfterClick
- MenuOptionBase.Tag
- MenuOptionBase.TextSize
- MenuOptionBase.TextStyle
- MenuOptionBase.PlaySound
- MenuOptionBase.VisibilityChanged
- MenuOptionBase.EnabledChanged
- MenuOptionBase.TextChanged
- MenuOptionBase.Validating
- MenuOptionBase.Click
- MenuOptionBase.BeforeFormat
- MenuOptionBase.AfterFormat
- MenuOptionBase.IsClickTaskCompleted(IPlayer)
- MenuOptionBase.GetVisible(IPlayer)
- MenuOptionBase.SetVisible(IPlayer, bool)
- MenuOptionBase.GetEnabled(IPlayer)
- MenuOptionBase.SetEnabled(IPlayer, bool)
- MenuOptionBase.GetDisplayText(IPlayer, int)
- MenuOptionBase.OnValidatingAsync(IPlayer)
- MenuOptionBase.OnClickAsync(IPlayer)
- object.Equals(object?)
- object.Equals(object?, object?)
- object.GetHashCode()
- object.GetType()
- object.ReferenceEquals(object?, object?)
- object.ToString()
Constructors
SubmenuMenuOption(IMenuAPI, int, int)
Creates an instance of SwiftlyS2.Core.Menus.OptionsBase.SubmenuMenuOption with a pre-built submenu.
public SubmenuMenuOption(IMenuAPI submenu, int updateIntervalMs = 120, int pauseIntervalMs = 1000)- submenu IMenuAPI — The submenu to open when this option is clicked.
- updateIntervalMs int — The interval in milliseconds between text updates. Defaults to 120ms.
- pauseIntervalMs int — The pause duration in milliseconds before starting the next text update cycle. Defaults to 1000ms.
When using this constructor, the SwiftlyS2.Core.Menus.OptionsBase.MenuOptionBase.Text property must be manually set to specify the initial text.
SubmenuMenuOption(string, IMenuAPI, int, int)
Creates an instance of SwiftlyS2.Core.Menus.OptionsBase.SubmenuMenuOption with a pre-built submenu.
public SubmenuMenuOption(string text, IMenuAPI submenu, int updateIntervalMs = 120, int pauseIntervalMs = 1000)- text string — The text content to display.
- submenu IMenuAPI — The submenu to open when this option is clicked.
- updateIntervalMs int — The interval in milliseconds between text updates. Defaults to 120ms.
- pauseIntervalMs int — The pause duration in milliseconds before starting the next text update cycle. Defaults to 1000ms.
SubmenuMenuOption(Func<IMenuAPI>, int, int)
Creates an instance of SwiftlyS2.Core.Menus.OptionsBase.SubmenuMenuOption with a synchronous builder.
public SubmenuMenuOption(Func<IMenuAPI> submenuBuilder, int updateIntervalMs = 120, int pauseIntervalMs = 1000)- submenuBuilder Func<IMenuAPI> — Function that builds and returns the submenu.
- updateIntervalMs int — The interval in milliseconds between text updates. Defaults to 120ms.
- pauseIntervalMs int — The pause duration in milliseconds before starting the next text update cycle. Defaults to 1000ms.
When using this constructor, the SwiftlyS2.Core.Menus.OptionsBase.MenuOptionBase.Text property must be manually set to specify the initial text.
SubmenuMenuOption(string, Func<IMenuAPI>, int, int)
Creates an instance of SwiftlyS2.Core.Menus.OptionsBase.SubmenuMenuOption with a synchronous builder.
public SubmenuMenuOption(string text, Func<IMenuAPI> submenuBuilder, int updateIntervalMs = 120, int pauseIntervalMs = 1000)- text string — The text content to display.
- submenuBuilder Func<IMenuAPI> — Function that builds and returns the submenu.
- updateIntervalMs int — The interval in milliseconds between text updates. Defaults to 120ms.
- pauseIntervalMs int — The pause duration in milliseconds before starting the next text update cycle. Defaults to 1000ms.
SubmenuMenuOption(Func<Task<IMenuAPI>>, int, int)
Creates an instance of SwiftlyS2.Core.Menus.OptionsBase.SubmenuMenuOption with an asynchronous builder.
public SubmenuMenuOption(Func<Task<IMenuAPI>> submenuBuilderAsync, int updateIntervalMs = 120, int pauseIntervalMs = 1000)- submenuBuilderAsync Func<Task<IMenuAPI>> — Async function that builds and returns the submenu.
- updateIntervalMs int — The interval in milliseconds between text updates. Defaults to 120ms.
- pauseIntervalMs int — The pause duration in milliseconds before starting the next text update cycle. Defaults to 1000ms.
When using this constructor, the SwiftlyS2.Core.Menus.OptionsBase.MenuOptionBase.Text property must be manually set to specify the initial text.
SubmenuMenuOption(string, Func<Task<IMenuAPI>>, int, int)
Creates an instance of SwiftlyS2.Core.Menus.OptionsBase.SubmenuMenuOption with an asynchronous builder.
public SubmenuMenuOption(string text, Func<Task<IMenuAPI>> submenuBuilderAsync, int updateIntervalMs = 120, int pauseIntervalMs = 1000)- text string — The text content to display.
- submenuBuilderAsync Func<Task<IMenuAPI>> — Async function that builds and returns the submenu.
- updateIntervalMs int — The interval in milliseconds between text updates. Defaults to 120ms.
- pauseIntervalMs int — The pause duration in milliseconds before starting the next text update cycle. Defaults to 1000ms.