A menu is a helper object for managing in-game menus.
Name | Description |
---|---|
AddItem | Appends a new item to the end of a menu. |
Cancel | Cancels a menu from displaying on all clients. While the cancellation is in progress, this menu cannot be re-displayed to any clients. |
Display | Displays a menu to a client. |
DisplayAt | Displays a menu to a client, starting from the given item. |
DisplayVote | 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. |
DisplayVoteToAll | Sends a vote menu to all clients. See VoteMenu() for more information. |
GetItem | Retrieves information about a menu item. |
GetTitle | Returns the text of a menu's title. |
InsertItem | 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. |
Menu | Creates a new, empty menu using the default style. |
RemoveAllItems | Removes all items from a menu. |
RemoveItem | Removes an item from the menu. |
SetClientMapping | Fills the client vote option mapping with user supplied values. |
SetTitle | Sets the menu's default title/instruction message. |
ShufflePerClient | Generates a per-client random mapping for the current vote options. |
ToPanel | Creates a raw MenuPanel based off the menu's style. The Handle must be freed with CloseHandle(). |
Name | Type | Description |
---|---|---|
Pagination | int | Get or set the menu's pagination. |
OptionFlags | int | Get or set the menu's option flags. |
ExitButton | bool | Returns whether or not the menu has an exit button. By default, menus have an exit button. |
ExitBackButton | bool | Controls whether or not the menu has an "exit back" button. By default, menus do not have an exit back button. |
NoVoteButton | bool | Sets whether or not the menu has a "no vote" button in slot 1. By default, menus do not have a no vote button. |
VoteResultCallback | VoteHandler | Sets an advanced vote handling callback. If this callback is set, MenuAction_VoteEnd will not be called. |
ItemCount | int | Returns the number of items in a menu. |
Style | Handle | Returns the menu style. The Handle is global and cannot be closed. |
Selection | int | Returns the first item on the page of a currently selected menu. |
This documentation was generated automatically using pawn-docgen written by xPaw for AlliedMods.