Summary

Methods

Creates the main menu if it does not exist yet.
Returns the tab panel shown in the main menu.
Returns the height of the main menu.
Returns the time until which releasing the scoreboard key keeps the main menu open.
Returns the tab buttons and panels created by the main menu.
GetOpen()client
Returns whether the main menu is open.
Returns the main menu panel.
Returns the width of the main menu's tab panels.
Returns whether the main menu is open on a tab panel.
Opens or closes the main menu.
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 nil Whether the new menu starts open

Returns the tab panel shown in the main menu.

Returns

  • Panel The active tab panel, or nil if 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 UnPredictedCurTime value, or nil if the menu was never opened that way

Returns the tab buttons and panels created by the main menu.

Returns

  • Map<Map> Tables with button and panel keyed 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 nil if it has not been created or was removed

Returns the width of the main menu's tab panels.

Returns

  • Number Width in pixels

cw.menu:IsPanelActive(panel)

client gamemodes/catwork/gamemode/core/libraries/cl_menu.lua:24

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 panel is 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.

Defined in