Manages menu creation and displaying.
More...
#include <public/IMenuManager.h>
Inherits SourceMod::SMInterface.
List of all members.
Public Member Functions |
|
virtual const char * | GetInterfaceName () |
| | Must return a string defining the interface's unique name.
|
|
virtual unsigned int | GetInterfaceVersion () |
| | Must return an integer defining the interface's version.
|
| virtual bool | IsVersionCompatible (unsigned int version) |
| | Must return whether the requested version number is backwards compatible. Note: This can be overridden for breaking changes or custom versioning.
|
| virtual IMenuStyle * | FindStyleByName (const char *name)=0 |
| | Finds a style by name.
|
| virtual IMenuStyle * | GetDefaultStyle ()=0 |
| | Returns the default draw style Core is using.
|
| virtual IMenuPanel * | RenderMenu (int client, menu_states_t &states, ItemOrder order)=0 |
| | Given a set of menu states, converts it to an IMenuPanel object.
|
| virtual void | CancelMenu (IBaseMenu *menu)=0 |
| | Cancels a menu. Calls IBaseMenu::Cancel() after doing some preparatory work. This should always be used instead of directly calling Cancel().
|
| virtual bool | StartVote (IBaseMenu *menu, unsigned int num_clients, int clients[], unsigned int max_time, unsigned int flags=0)=0 |
| | Displays a menu as a vote.
|
| virtual bool | IsVoteInProgress ()=0 |
| | Returns whether or not a vote is in progress.
|
|
virtual void | CancelVoting ()=0 |
| | Cancels the vote in progress. This calls IBaseMenu::Cancel().
|
| virtual unsigned int | GetRemainingVoteDelay ()=0 |
| | Returns the remaining vote delay from the last menu. This delay is a suggestion for all public votes, and is not enforced.
|
| virtual bool | IsClientInVotePool (int client)=0 |
| | Returns whether a client is in the "allowed to vote" pool determined by the initial call to StartVote().
|
| virtual bool | RedrawClientVoteMenu (int client)=0 |
| | Redraws the current vote menu to a client in the voting pool.
|
| virtual bool | RedrawClientVoteMenu2 (int client, bool revotes)=0 |
| | Redraws the current vote menu to a client in the voting pool.
|
Detailed Description
Manages menu creation and displaying.
Definition at line 808 of file IMenuManager.h.
Member Function Documentation
| virtual bool SourceMod::IMenuManager::IsVersionCompatible |
( |
unsigned int |
version |
) |
[inline, virtual] |
Must return whether the requested version number is backwards compatible. Note: This can be overridden for breaking changes or custom versioning.
- Parameters:
-
| version | Version number to compare against. |
- Returns:
- True if compatible, false otherwise.
Reimplemented from SourceMod::SMInterface.
Definition at line 819 of file IMenuManager.h.
| virtual IMenuStyle* SourceMod::IMenuManager::FindStyleByName |
( |
const char * |
name |
) |
[pure virtual] |
Finds a style by name.
- Parameters:
-
| name | Name of the style (case insensitive). |
- Returns:
- IMenuStyle pointer, or NULL if not found.
| virtual IMenuStyle* SourceMod::IMenuManager::GetDefaultStyle |
( |
|
) |
[pure virtual] |
Returns the default draw style Core is using.
- Returns:
- Menu style pointer.
| virtual IMenuPanel* SourceMod::IMenuManager::RenderMenu |
( |
int |
client, |
|
|
menu_states_t & |
states, |
|
|
ItemOrder |
order | |
|
) |
| | [pure virtual] |
Given a set of menu states, converts it to an IMenuPanel object.
The state parameter is both INPUT and OUTPUT. INPUT: menu, mh, firstItem, lastItem OUTPUT: display, firstItem, lastItem, slots
- Parameters:
-
| client | Client index. |
| states | Menu states. |
| order | Order to search for items. |
- Returns:
- IMenuPanel pointer, or NULL if no items could be found in the IBaseMenu pointer, or NULL if any other error occurred. Any valid pointer must be freed using IMenuPanel::DeleteThis.
| virtual void SourceMod::IMenuManager::CancelMenu |
( |
IBaseMenu * |
menu |
) |
[pure virtual] |
Cancels a menu. Calls IBaseMenu::Cancel() after doing some preparatory work. This should always be used instead of directly calling Cancel().
- Parameters:
-
| virtual bool SourceMod::IMenuManager::StartVote |
( |
IBaseMenu * |
menu, |
|
|
unsigned int |
num_clients, |
|
|
int |
clients[], |
|
|
unsigned int |
max_time, |
|
|
unsigned int |
flags = 0 | |
|
) |
| | [pure virtual] |
Displays a menu as a vote.
- Parameters:
-
| menu | IBaseMenu pointer. |
| num_clients | Number of clients to display to. |
| clients | Client index array. |
| max_time | Maximum time to hold menu for. |
| flags | Vote flags. |
- Returns:
- True on success, false if a vote is in progress.
| virtual bool SourceMod::IMenuManager::IsVoteInProgress |
( |
|
) |
[pure virtual] |
Returns whether or not a vote is in progress.
- Returns:
- True if a vote is in progress, false otherwise.
| virtual unsigned int SourceMod::IMenuManager::GetRemainingVoteDelay |
( |
|
) |
[pure virtual] |
Returns the remaining vote delay from the last menu. This delay is a suggestion for all public votes, and is not enforced.
- Returns:
- Number of seconds to wait.
| virtual bool SourceMod::IMenuManager::IsClientInVotePool |
( |
int |
client |
) |
[pure virtual] |
Returns whether a client is in the "allowed to vote" pool determined by the initial call to StartVote().
- Parameters:
-
- Returns:
- True if client is allowed to vote, false on failure.
| virtual bool SourceMod::IMenuManager::RedrawClientVoteMenu |
( |
int |
client |
) |
[pure virtual] |
Redraws the current vote menu to a client in the voting pool.
- Parameters:
-
- Returns:
- True on success, false if client is not allowed to vote.
| virtual bool SourceMod::IMenuManager::RedrawClientVoteMenu2 |
( |
int |
client, |
|
|
bool |
revotes | |
|
) |
| | [pure virtual] |
Redraws the current vote menu to a client in the voting pool.
- Parameters:
-
| client | Client index. |
| revotes | True to allow revotes, false otherwise. |
- Returns:
- True on success, false if client is not allowed to vote.
The documentation for this class was generated from the following file: