#include <public/IMenuManager.h>
Public Member Functions | |
| virtual IMenuStyle * | GetParentStyle ()=0 |
| Returns the parent IMenuStyle pointer. | |
| virtual void | Reset ()=0 |
| Resets/clears the cached display text. | |
| virtual void | DrawTitle (const char *text, bool onlyIfEmpty=false)=0 |
| Sets how the title should be drawn. | |
| virtual unsigned int | DrawItem (const ItemDrawInfo &item)=0 |
| Adds an item to the menu and returns the position (1-10). | |
| virtual bool | DrawRawLine (const char *rawline)=0 |
| Draws a raw line of text, if supported. The line does not need to be newline terminated. | |
| virtual bool | SetExtOption (MenuOption option, const void *valuePtr)=0 |
| Sets an extended menu option. | |
| virtual bool | CanDrawItem (unsigned int drawFlags)=0 |
| Returns whether the display is capable of rendering an item with the given flags. | |
| virtual bool | SendDisplay (int client, IMenuHandler *handler, unsigned int time)=0 |
| Sends the menu display to a client. | |
| virtual void | DeleteThis ()=0 |
| Destroys the display object. | |
| virtual bool | SetSelectableKeys (unsigned int keymap)=0 |
| Sets the selectable key map. Returns false if the function is not supported. | |
| virtual unsigned int | GetCurrentKey ()=0 |
| Returns the current key position. | |
| virtual bool | SetCurrentKey (unsigned int key)=0 |
| Sets the next key position. This cannot be used to traverse backwards. | |
| virtual int | GetAmountRemaining ()=0 |
| Returns the number of characters that can be added to the menu. The internal buffer is truncated if overflowed; this is for manual truncation/wrapping purposes. | |
| virtual unsigned int | GetApproxMemUsage ()=0 |
| For the Handle system, returns approximate memory usage. | |
Definition at line 212 of file IMenuManager.h.
| virtual IMenuStyle* SourceMod::IMenuPanel::GetParentStyle | ( | ) | [pure virtual] |
| virtual void SourceMod::IMenuPanel::DrawTitle | ( | const char * | text, | |
| bool | onlyIfEmpty = false | |||
| ) | [pure virtual] |
Sets how the title should be drawn.
| text | Text string to display for the title. | |
| onlyIfEmpty | Only sets the title if one does not already exist. |
| virtual unsigned int SourceMod::IMenuPanel::DrawItem | ( | const ItemDrawInfo & | item | ) | [pure virtual] |
Adds an item to the menu and returns the position (1-10).
Note: Item will fail to draw if there are too many items, or the item is not drawable (for example, invisible).
| virtual bool SourceMod::IMenuPanel::DrawRawLine | ( | const char * | rawline | ) | [pure virtual] |
Draws a raw line of text, if supported. The line does not need to be newline terminated.
| virtual bool SourceMod::IMenuPanel::SetExtOption | ( | MenuOption | option, | |
| const void * | valuePtr | |||
| ) | [pure virtual] |
Sets an extended menu option.
| option | Option type. | |
| valuePtr | Pointer of the type expected by the option. |
| virtual bool SourceMod::IMenuPanel::CanDrawItem | ( | unsigned int | drawFlags | ) | [pure virtual] |
Returns whether the display is capable of rendering an item with the given flags.
| drawFlags | ITEMDRAW flags. |
| virtual bool SourceMod::IMenuPanel::SendDisplay | ( | int | client, | |
| IMenuHandler * | handler, | |||
| unsigned int | time | |||
| ) | [pure virtual] |
Sends the menu display to a client.
| client | Client index to display to. | |
| handler | Menu handler to use. | |
| time | Time to hold menu for. |
| virtual bool SourceMod::IMenuPanel::SetSelectableKeys | ( | unsigned int | keymap | ) | [pure virtual] |
Sets the selectable key map. Returns false if the function is not supported.
| keymap | A bit string where each bit N-1 specifies that key N is selectable (key 0 is bit 9). If the selectable key map is 0, it will be automatically set to allow 0. |
| virtual unsigned int SourceMod::IMenuPanel::GetCurrentKey | ( | ) | [pure virtual] |
Returns the current key position.
| virtual bool SourceMod::IMenuPanel::SetCurrentKey | ( | unsigned int | key | ) | [pure virtual] |
Sets the next key position. This cannot be used to traverse backwards.
| key | Key that is greater or equal to GetCurrentKey(). |
| virtual int SourceMod::IMenuPanel::GetAmountRemaining | ( | ) | [pure virtual] |
Returns the number of characters that can be added to the menu. The internal buffer is truncated if overflowed; this is for manual truncation/wrapping purposes.
| virtual unsigned int SourceMod::IMenuPanel::GetApproxMemUsage | ( | ) | [pure virtual] |
For the Handle system, returns approximate memory usage.
1.5.1