Menu Class

A menu is a helper object for managing in-game menus.

Methods 16

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().

Properties 9

Name Type Description
Paginationint

Get or set the menu's pagination.

OptionFlagsint

Get or set the menu's option flags.

ExitButtonbool

Returns whether or not the menu has an exit button. By default, menus have an exit button.

ExitBackButtonbool

Controls whether or not the menu has an "exit back" button. By default, menus do not have an exit back button.

NoVoteButtonbool

Sets whether or not the menu has a "no vote" button in slot 1. By default, menus do not have a no vote button.

VoteResultCallbackVoteHandler

Sets an advanced vote handling callback. If this callback is set, MenuAction_VoteEnd will not be called.

ItemCountint

Returns the number of items in a menu.

StyleHandle

Returns the menu style. The Handle is global and cannot be closed.

Selectionint

Returns the first item on the page of a currently selected menu.