#include <public/extensions/ITopMenus.h>
Public Member Functions | |
| virtual unsigned int | GetTopMenuAPIVersion1 () |
| Must return the topmenu API version. | |
| virtual unsigned int | OnTopMenuDrawOption (ITopMenu *menu, int client, unsigned int object_id) |
| Requests how the given item should be drawn for a client. | |
| virtual void | OnTopMenuDisplayOption (ITopMenu *menu, int client, unsigned int object_id, char buffer[], size_t maxlength)=0 |
| Requests how the given item should be displayed for a client. | |
| virtual void | OnTopMenuDisplayTitle (ITopMenu *menu, int client, unsigned int object_id, char buffer[], size_t maxlength)=0 |
| Requests how the given item's title should be displayed for a client. This is called on any object_id that is a category. | |
| virtual void | OnTopMenuSelectOption (ITopMenu *menu, int client, unsigned int object_id)=0 |
| Notifies the listener that the menu option has been selected. | |
| virtual void | OnTopMenuObjectRemoved (ITopMenu *menu, unsigned int object_id)=0 |
| Notified when the given item is removed. | |
Definition at line 74 of file ITopMenus.h.
| virtual unsigned int SourceMod::ITopMenuObjectCallbacks::GetTopMenuAPIVersion1 | ( | ) | [inline, virtual] |
Must return the topmenu API version.
Definition at line 82 of file ITopMenus.h.
| virtual unsigned int SourceMod::ITopMenuObjectCallbacks::OnTopMenuDrawOption | ( | ITopMenu * | menu, | |
| int | client, | |||
| unsigned int | object_id | |||
| ) | [inline, virtual] |
Requests how the given item should be drawn for a client.
Unlike the other callbacks, this is only called in determining whether to enable, disable, or ignore an item on a client's menu.
| menu | A pointer to the parent ITopMenu. | |
| client | Client index. | |
| object_id | Object ID returned from ITopMenu::AddToMenu(). |
Definition at line 99 of file ITopMenus.h.
| virtual void SourceMod::ITopMenuObjectCallbacks::OnTopMenuDisplayOption | ( | ITopMenu * | menu, | |
| int | client, | |||
| unsigned int | object_id, | |||
| char | buffer[], | |||
| size_t | maxlength | |||
| ) | [pure virtual] |
Requests how the given item should be displayed for a client.
This can be called either while drawing a menu or to decide how to sort a menu for a player.
| menu | A pointer to the parent ITopMenu. | |
| client | Client index. | |
| object_id | Object ID returned from ITopMenu::AddToMenu(). | |
| buffer | Buffer to store rendered text. | |
| maxlength | Maximum length of the rendering buffer. |
| virtual void SourceMod::ITopMenuObjectCallbacks::OnTopMenuDisplayTitle | ( | ITopMenu * | menu, | |
| int | client, | |||
| unsigned int | object_id, | |||
| char | buffer[], | |||
| size_t | maxlength | |||
| ) | [pure virtual] |
Requests how the given item's title should be displayed for a client. This is called on any object_id that is a category.
| menu | A pointer to the parent ITopMenu. | |
| client | Client index. | |
| object_id | Object ID returned from ITopMenu::AddToMenu(), or 0 if the title is the root menu title. | |
| buffer | Buffer to store rendered text. | |
| maxlength | Maximum length of the rendering buffer. |
| virtual void SourceMod::ITopMenuObjectCallbacks::OnTopMenuSelectOption | ( | ITopMenu * | menu, | |
| int | client, | |||
| unsigned int | object_id | |||
| ) | [pure virtual] |
Notifies the listener that the menu option has been selected.
| menu | A pointer to the parent ITopMenu. | |
| client | Client index. | |
| object_id | Object ID returned from ITopMenu::AddToMenu(). |
| virtual void SourceMod::ITopMenuObjectCallbacks::OnTopMenuObjectRemoved | ( | ITopMenu * | menu, | |
| unsigned int | object_id | |||
| ) | [pure virtual] |
Notified when the given item is removed.
| menu | A pointer to the parent ITopMenu. | |
| object_id | Object ID returned from ITopMenu::AddToMenu(), or 0 if the title callbacks are being removed. |
1.5.1