A menu is a helper object for managing in-game menus.
Panels are used for drawing raw menus without any extra helper functions. Handles must be closed via delete or CloseHandle().
Different actions for the menu "pump" callback
Describes a menu's source
Low-level drawing style of the menu.
Called when a menu action is completed.
Callback for when a vote has ended and results are available.
Appends a new item to the end of a menu.
Cancels a menu on a client. This will only affect non-external menus.
Cancels a menu from displaying on all clients. While the cancellation is in progress, this menu cannot be re-displayed to any clients.
Cancels the vote in progress.
Returns whether or not the given drawing flags are supported by the menu style.
Returns the number of seconds you should "wait" before displaying a publicly invocable menu. This number is the time remaining until (last_vote + sm_vote_delay).
Creates a new, empty menu using the default style.
Creates a Menu from a MenuStyle. The Handle must be closed with CloseHandle().
Creates a MenuPanel from a MenuStyle. Panels are used for drawing raw menus without any extra helper functions. The Handle must be closed with CloseHandle().
Creates a raw MenuPanel based off the menu's style. The Handle must be freed with CloseHandle().
Displays a menu to a client.
Displays a menu to a client, starting from the given item.
Draws an item on a panel. If the item takes up a slot, the position is returned.
Draws a raw line of text on a panel, without any markup other than a newline.
Returns whether a client is viewing a menu.
Returns a style's maximum items per page.
Returns whether or not the menu has an "exit back" button. By default, menus do not have an exit back button.
Returns whether or not the menu has an exit button. By default, menus have an exit button.
Retrieves information about a menu item.
Returns the number of items in a menu.
Retrieves a menu's option flags.
Returns a menu's pagination setting.
Returns the first item on the page of a currently selected menu.
Returns a menu's MenuStyle Handle. The Handle is global and cannot be freed.
Returns a style's global Handle.
Returns the text of a menu's title.
Retrieves voting information from MenuAction_VoteEnd.
Returns the current key position.
Returns a MenuPanel's parent style.
Returns the amount of text the menu can still hold. If this is limit is reached or overflowed, the text is silently truncated.
Inserts an item into the menu before a certain position; the new item will be at the given position and all next items pushed forward.
This function is provided for legacy code only. Some older plugins may use network messages instead of the panel API. This function wraps the panel API for eased portability into the SourceMod menu system.
Returns whether a client is in the pool of clients allowed to participate in the current vote. This is determined by the client list passed to VoteMenu().
Quick stock to determine whether voting is allowed. This doesn't let you fine-tune a reason for not voting, so it's not recommended for lazily telling clients that voting isn't allowed.
Returns whether a vote is in progress.
Fills the client vote option mapping with user supplied values.
Generates a per-client random mapping for the current vote options.
Redraws the current vote menu to a client in the voting pool.
Redraws menu text from inside a MenuAction_DisplayItem callback.
Removes all items from a menu.
Removes an item from the menu.
Sends a panel to a client. Unlike full menus, the handler function will only receive the following actions, both of which will have INVALID_HANDLE for a menu, and the client as param1.
Sets whether or not the menu has an "exit back" button. By default, menus do not have an exit back button.
Sets whether or not the menu has an exit button. By default, paginated menus have an exit button.
Sets whether or not the menu has a "no vote" button in slot 1. By default, menus do not have a no vote button.
Sets a menu's option flags.
Sets whether the menu should be paginated or not.
Sets the menu's default title/instruction message.
Sets the next key position. This cannot be used to traverse backwards.
Sets the selectable key map of a panel. This is not supported by all styles (only by Radio, as of this writing).
Sets the panel's title.
Sets an advanced vote handling callback. If this callback is set, MenuAction_VoteEnd will not be called.
Broadcasts a menu to a list of clients. The most selected item will be returned through MenuAction_End. On a tie, a random item will be returned from a list of the tied items.
Sends a vote menu to all clients. See VoteMenu() for more information.