Manages menu creation and displaying.
More...
#include <public/IMenuManager.h>
Manages menu creation and displaying.
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 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 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::IsVersionCompatible |
( |
unsigned int |
version | ) |
|
|
inlinevirtual |
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.
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 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.
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 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.
The documentation for this class was generated from the following file: