Flux.TabMenu classclient
Part of Active UI
Opens and closes the tab menu from code. The tab menu is the full screen menu that takes
the place of the scoreboard (the fl_tab_menu panel, or whatever the active theme has
registered as its 'tab_menu' panel); the gamemode opens it with Flux.TabMenu:open when
the scoreboard key is pressed and plugins can do the same, for example to bring the
player to their inventory. The menu that is open is kept in Flux.tab_menu.
OnTabMenuOpened and OnTabMenuClosed are run when it opens and closes. The server
reaches the menu of a player through Flux.Player:open_tab_menu and
Flux.Player:close_tab_menu, or Player:open_tab_menu and Player:close_tab_menu.
Summary
Methods
Methods
Closes the tab menu if it is open. The menu plays its closing animation and is removed afterwards.
Returns
- Boolean true if the menu was open and has been told to close
Returns the tab menu if it is open. A menu that is playing its closing animation does not count as open any more.
Returns
- Panel the tab menu, or nil if it is not open
Checks whether the tab menu is open.
Returns
- Boolean
Opens the tab menu, or returns the one that is open already. Without an item the menu shows the one that was open the last time, or its default one.
-- Open the tab menu on the inventory.
Flux.TabMenu:open('inventory')
Parameters
- panel_id String optional, defaults to
nilID of the menu item to show, as it was given to the menu's add_menu_item; the menu falls back to its default item if there is no such item
Returns
- Panel the tab menu, or nil if it could not be opened: the local player is not ready yet, a ShouldScoreboardShow handler has returned false or the theme has not created the panel