IMenuManagerAPI
Interfacepublic interface IMenuManagerAPICentral manager for creating and controlling all player menus.
View sourceProperties
Global configuration settings for all menus.
MenuManagerConfiguration Configuration { get; }Methods
Closes the active menu for a player. If the player has no menu open, this has no effect.
void CloseActiveMenu(IPlayer player)- playerIPlayerThe player whose active menu will be closed.
Closes the specified menu for all players who have it open.
void CloseMenu(IMenuAPI menu)- menuIMenuAPIThe menu to close.
Closes the specified menu for a player. If the menu is not open for that player, this has no effect.
void CloseMenuForPlayer(IPlayer player, IMenuAPI menu)Creates a new menu builder.
IMenuBuilderAPI CreateBuilder()CreateMenu(MenuConfiguration, MenuKeybindOverrides, IMenuAPI?, MenuOptionScrollStyle, MenuOptionTextStyle)
Creates a new menu with an optional title.
IMenuAPI CreateMenu(MenuConfiguration configuration, MenuKeybindOverrides keybindOverrides, IMenuAPI? parent = null, MenuOptionScrollStyle optionScrollStyle = MenuOptionScrollStyle.CenterFixed, MenuOptionTextStyle optionTextStyle = MenuOptionTextStyle.TruncateEnd)- configurationMenuConfigurationThe configuration for the menu.
- keybindOverridesMenuKeybindOverridesThe keybind overrides for the menu.
- parentIMenuAPI?optionalThe parent menu, or null for no parent.
- optionScrollStyleMenuOptionScrollStyleoptionalThe scroll style for the menu options.
- optionTextStyleMenuOptionTextStyleoptionalThe text overflow style for the menu options.
Gets the menu currently open for the specified player.
IMenuAPI? GetCurrentMenu(IPlayer player)- playerIPlayerThe player to check.
Opens the specified menu for all players.
void OpenMenu(IMenuAPI menu)- menuIMenuAPIThe menu to display.
Opens the specified menu for all players.
void OpenMenu(IMenuAPI menu, Action<IPlayer, IMenuAPI> onClosed)Opens the specified menu for a player. Any currently open menu will be closed first.
void OpenMenuForPlayer(IPlayer player, IMenuAPI menu)Opens the specified menu for a player. Any currently open menu will be closed first.
void OpenMenuForPlayer(IPlayer player, IMenuAPI menu, Action<IPlayer, IMenuAPI> onClosed)Fired when a menu is closed for a player.
event EventHandler<MenuManagerEventArgs>? MenuClosedFired when a menu is opened for a player.
event EventHandler<MenuManagerEventArgs>? MenuOpened