cw.menu classclient
Summary
Methods
Create(setOpen)client
Creates the main menu if it does not exist yet.
GetActivePanel()client
Returns the tab panel shown in the main menu.
GetHeight()client
Returns the height of the main menu.
GetHoldTime()client
Returns the time until which releasing the scoreboard key keeps the main menu open.
GetItems()client
Returns the tab buttons and panels created by the main menu.
GetOpen()client
Returns whether the main menu is open.
GetPanel()client
Returns the main menu panel.
GetWidth()client
Returns the width of the main menu's tab panels.
IsPanelActive(panel)client
Returns whether the main menu is open on a tab panel.
SetOpen(bIsOpen)client
Opens or closes the main menu.
ToggleOpen()client
Opens the main menu if it is closed, and closes it otherwise.
Methods
Creates the main menu if it does not exist yet.
Parameters
- setOpen Boolean optional, defaults to
nilWhether the new menu starts open
Returns the tab panel shown in the main menu.
Returns
- Panel The active tab panel, or
nilif there is none or the menu does not exist
Returns the height of the main menu.
Returns
- Number Height in pixels
Returns the time until which releasing the scoreboard key keeps the main menu open.
Set to half a second after the menu is opened with the scoreboard key, so a short press leaves it open.
Returns
- Number An
UnPredictedCurTimevalue, ornilif the menu was never opened that way
Returns the tab buttons and panels created by the main menu.
Returns
- Map<Map> Tables with
buttonandpanelkeyed by the VGUI class name of the tab
Returns whether the main menu is open.
Returns
- Boolean Whether the menu is open
Returns the main menu panel.
Returns
- Panel The menu, or
nilif it has not been created or was removed
Returns the width of the main menu's tab panels.
Returns
- Number Width in pixels
Returns whether the main menu is open on a tab panel.
Parameters
- panel Panel The tab panel to check
Returns
- Boolean Whether the menu is open and
panelis its active tab
Opens or closes the main menu.
Does nothing if the menu does not exist.
Parameters
- bIsOpen Boolean Whether to open the menu
See also
Opens the main menu if it is closed, and closes it otherwise.
Does nothing if the menu does not exist.