Text menu.
Type: Reference type
Declaration | Description |
---|---|
CTextMenu@ CTextMenu(TextMenuPlayerSlotCallback@ inputCB) | Constructor. You must pass a player slot callback and handle the input yourself. |
TextMenuId_t get_Id() const | Gets this text menu's id. If CTextMenus::INVALID_TEXT_MENU_ID, this is an unregistered menu. |
bool IsRegistered() const | Returns whether this menu is registered or not. |
bool Register() | Registers this text menu. |
void Unregister() | Unregisters this text menu. |
void Open(const int iDisplayTime, const uint page, array<edict_t@>@ pPlayers = null) | Opens the menu and keeps it open for the given amount of time. Time must be a positive value. Maximum 255 seconds. Pass 0 for infinite. You can optionally pass a list of players that receive this menu. |
void Open(const int iDisplayTime, const uint page, CBasePlayer@ pPlayer) | Opens the menu and keeps it open for the given amount of time. Time must be a positive value. Maximum 255 seconds. Pass 0 for infinite. You must pass the player that receives this menu. |
size_t GetItemCount() const | Gets the number of items in this menu. |
uint GetPageCount() const | Gets the number of pages in this menu. |
const CTextMenuItem@ GetItem(const size_t uiIndex) const | Gets the item at the given index. |
const string& GetTitle() const | Gets the title. |
void SetTitle(const string& in szTitle) | Sets the title. |
void AddItem( const string& in szName, any@ pUserData = null) | Adds an item to the menu. |