SubmenuMenuOption
Classpublic sealed class SubmenuMenuOption : MenuOptionBase, IMenuOption, IDisposableRepresents a menu option that opens a submenu when clicked.
View sourceConstructors
Creates an instance of SubmenuMenuOption with a pre-built submenu.
public SubmenuMenuOption(IMenuAPI submenu, int updateIntervalMs = 120, int pauseIntervalMs = 1000)When using this constructor, the Text property must be manually set to specify the initial text.
Creates an instance of SubmenuMenuOption with a pre-built submenu.
public SubmenuMenuOption(string text, IMenuAPI submenu, int updateIntervalMs = 120, int pauseIntervalMs = 1000)- textstringThe text content to display.
- submenuIMenuAPIThe submenu to open when this option is clicked.
- 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.
Creates an instance of SubmenuMenuOption with a synchronous builder.
public SubmenuMenuOption(Func<IMenuAPI> submenuBuilder, int updateIntervalMs = 120, int pauseIntervalMs = 1000)When using this constructor, the Text property must be manually set to specify the initial text.
Creates an instance of SubmenuMenuOption with a synchronous builder.
public SubmenuMenuOption(string text, Func<IMenuAPI> submenuBuilder, int updateIntervalMs = 120, int pauseIntervalMs = 1000)- textstringThe text content to display.
- submenuBuilderFunc<IMenuAPI>Function that builds and returns the submenu.
- 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.
Creates an instance of SubmenuMenuOption with an asynchronous builder.
public SubmenuMenuOption(Func<Task<IMenuAPI>> submenuBuilderAsync, int updateIntervalMs = 120, int pauseIntervalMs = 1000)- submenuBuilderAsyncFunc<Task<IMenuAPI>>Async function that builds and returns the submenu.
- 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.
Creates an instance of SubmenuMenuOption with an asynchronous builder.
public SubmenuMenuOption(string text, Func<Task<IMenuAPI>> submenuBuilderAsync, int updateIntervalMs = 120, int pauseIntervalMs = 1000)- textstringThe text content to display.
- submenuBuilderAsyncFunc<Task<IMenuAPI>>Async function that builds and returns the submenu.
- 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.