3 * =============================================================================
5 * Copyright (C) 2004-2008 AlliedModders LLC. All rights reserved.
6 * =============================================================================
8 * This program is free software; you can redistribute it and/or modify it under
9 * the terms of the GNU General Public License, version 3.0, as published by the
10 * Free Software Foundation.
12 * This program is distributed in the hope that it will be useful, but WITHOUT
13 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
14 * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
17 * You should have received a copy of the GNU General Public License along with
18 * this program. If not, see <http://www.gnu.org/licenses/>.
20 * As a special exception, AlliedModders LLC gives you permission to link the
21 * code of this program (as well as its derivative works) to "Half-Life 2," the
22 * "Source Engine," the "SourcePawn JIT," and any Game MODs that run on software
23 * by the Valve Corporation. You must obey the GNU General Public License in
24 * all respects for all other code used. Additionally, AlliedModders LLC grants
25 * this exception to all derivative works. AlliedModders LLC defines further
26 * exceptions, found in LICENSE.txt (as of this writing, version JULY-31-2007),
27 * or <http://www.sourcemod.net/license.php>.
32 #ifndef _INCLUDE_SOURCEMOD_MENU_SYSTEM_H_
33 #define _INCLUDE_SOURCEMOD_MENU_SYSTEM_H_
35 #include <IShareSys.h>
36 #include <IHandleSys.h>
38 #define SMINTERFACE_MENUMANAGER_NAME "IMenuManager"
39 #define SMINTERFACE_MENUMANAGER_VERSION 16
42 * @file IMenuManager.h
43 * @brief Abstracts on-screen menus for clients.
49 * @brief Used to determine how an item selection is interpreted.
53 ItemSel_None, /**< Invalid selection */
54 ItemSel_Back, /**< Go back one page (really "Previous") */
55 ItemSel_Next, /**< Go forward one page */
56 ItemSel_Exit, /**< Menu was exited */
57 ItemSel_Item, /**< Valid item selection */
58 ItemSel_ExitBack, /**< Sends MenuEnd_ExitBack */
62 * @brief Used to determine which order to search for items in.
66 ItemOrder_Ascending, /**< Items should be drawn ascendingly */
67 ItemOrder_Descending, /**< Items should be drawn descendingly */
71 * @brief Pairs an item type with an item menu position.
75 ItemSelection type; /**< Item selection type */
76 unsigned int item; /**< Item position, if applicable */
84 * @brief Describes menu display information.
88 unsigned int apiVers; /**< Must be filled with the API version */
89 IBaseMenu *menu; /**< Menu pointer, or NULL if there is only a display */
90 IMenuHandler *mh; /**< Menu callbacks handler */
91 unsigned int firstItem; /**< MENU ONLY: First item displayed on the last page */
92 unsigned int lastItem; /**< MENU ONLY: Last item displayed on the last page */
93 unsigned int item_on_page; /**< MENU ONLY: First item on page */
94 menu_slots_t slots[11]; /**< MENU ONLY: Item selection table (first index is 1) */
97 #define ITEMDRAW_DEFAULT (0) /**< Item should be drawn normally */
98 #define ITEMDRAW_DISABLED (1<<0) /**< Item is drawn but not selectable */
99 #define ITEMDRAW_RAWLINE (1<<1) /**< Item should be a raw line, without a slot */
100 #define ITEMDRAW_NOTEXT (1<<2) /**< No text should be drawn */
101 #define ITEMDRAW_SPACER (1<<3) /**< Item should be drawn as a spacer, if possible */
102 #define ITEMDRAW_IGNORE ((1<<1)|(1<<2)) /**< Item should be completely ignored (rawline + notext) */
103 #define ITEMDRAW_CONTROL (1<<4) /**< Item is control text (back/next/exit) */
106 * @brief Information about item drawing.
110 ItemDrawInfo(const char *DISPLAY=NULL, unsigned int STYLE=ITEMDRAW_DEFAULT,
111 unsigned int FLAGS=0, const char *HELPTEXT=NULL)
112 : display(DISPLAY), style(STYLE)
115 const char *display; /**< Display text (NULL for none) */
116 unsigned int style; /**< ITEMDRAW style flags */
120 * @brief Contains information about a vote result.
122 struct menu_vote_result_t
124 unsigned int num_clients; /**< Number of clients the menu was displayed to */
125 unsigned int num_votes; /**< Number of votes received */
126 struct menu_client_vote_t
128 int client; /**< Client index */
129 int item; /**< Item # (or -1 for none) */
130 } *client_list; /**< Array of size num_clients */
131 unsigned int num_items; /**< Number of items voted for */
132 struct menu_item_vote_t
134 unsigned int item; /**< Item index */
135 unsigned int count; /**< Number of votes */
136 } *item_list; /**< Array of size num_items, sorted by count,
141 * @brief Reasons for a menu dying.
143 enum MenuCancelReason
145 MenuCancel_Disconnected = -1, /**< Client dropped from the server */
146 MenuCancel_Interrupted = -2, /**< Client was interrupted with another menu */
147 MenuCancel_Exit = -3, /**< Client selected "exit" on a paginated menu */
148 MenuCancel_NoDisplay = -4, /**< Menu could not be displayed to the client */
149 MenuCancel_Timeout = -5, /**< Menu timed out */
150 MenuCancel_ExitBack = -6, /**< Client selected "exit back" on a paginated menu */
154 * @brief Reasons a menu ended.
158 MenuEnd_Selected = 0, /**< Menu item was selected */
159 MenuEnd_VotingDone = -1, /**< Voting finished */
160 MenuEnd_VotingCancelled = -2, /**< Voting was cancelled */
161 MenuEnd_Cancelled = -3, /**< Menu was uncleanly cancelled */
162 MenuEnd_Exit = -4, /**< Menu was cleanly exited via "exit" */
163 MenuEnd_ExitBack = -5, /**< Menu was cleanly exited via "back" */
167 * @brief Reasons a vote can be cancelled.
169 enum VoteCancelReason
171 VoteCancel_Generic = -1, /**< Vote was generically cancelled. */
172 VoteCancel_NoVotes = -2, /**< Vote did not receive any votes. */
175 #define MENU_NO_PAGINATION 0 /**< Menu should not be paginated (10 items max) */
176 #define MENU_TIME_FOREVER 0 /**< Menu should be displayed as long as possible */
178 #define MENUFLAG_BUTTON_EXIT (1<<0) /**< Menu has an "exit" button */
179 #define MENUFLAG_BUTTON_EXITBACK (1<<1) /**< Menu has an "exit back" button */
180 #define MENUFLAG_NO_SOUND (1<<2) /**< Menu will not have any select sounds */
181 #define MENUFLAG_BUTTON_NOVOTE (1<<3) /**< Menu has a "No Vote" button at slot 1 */
183 #define VOTEFLAG_NO_REVOTES (1<<0) /**< Players cannot change their votes */
186 * @brief Extended menu options.
190 MenuOption_IntroMessage, /**< CONST CHAR *: Valve menus only; defaults to:
191 "You have a menu, hit ESC"
193 MenuOption_IntroColor, /**< INT[4]: Valve menus only; specifies the intro message colour
194 using R,G,B,A (defaults to 255,0,0,255)
196 MenuOption_Priority, /**< INT *: Valve menus only; priority (less is higher) */
200 * @brief Describes the menu a player is viewing.
204 MenuSource_None = 0, /**< No menu is being displayed */
205 MenuSource_External = 1, /**< External menu, no pointer */
206 MenuSource_BaseMenu = 2, /**< An IBaseMenu pointer. */
207 MenuSource_Display = 3, /**< IMenuPanel source, no pointer */
213 * @brief Sets how a raw menu should be drawn.
219 * @brief Returns the parent IMenuStyle pointer.
221 * @return IMenuStyle pointer which created
224 virtual IMenuStyle *GetParentStyle() =0;
227 * @brief Resets/clears the cached display text.
229 virtual void Reset() =0;
232 * @brief Sets how the title should be drawn.
234 * @param text Text string to display for the title.
235 * @param onlyIfEmpty Only sets the title if one does not already
238 virtual void DrawTitle(const char *text, bool onlyIfEmpty=false) =0;
241 * @brief Adds an item to the menu and returns the position (1-10).
243 * Note: Item will fail to draw if there are too many items,
244 * or the item is not drawable (for example, invisible).
246 * @return Item draw position, or 0 on failure.
248 virtual unsigned int DrawItem(const ItemDrawInfo &item) =0;
251 * @brief Draws a raw line of text, if supported. The line does not
252 * need to be newline terminated.
254 * @return True on success, false if not supported.
256 virtual bool DrawRawLine(const char *rawline) =0;
259 * @brief Sets an extended menu option.
261 * @param option Option type.
262 * @param valuePtr Pointer of the type expected by the option.
263 * @return True on success, false if option or value is not supported.
265 virtual bool SetExtOption(MenuOption option, const void *valuePtr) =0;
268 * @brief Returns whether the display is capable of rendering an item
269 * with the given flags.
271 * @param drawFlags ITEMDRAW flags.
272 * @return True if renderable, false otherwise.
274 virtual bool CanDrawItem(unsigned int drawFlags) =0;
277 * @brief Sends the menu display to a client.
279 * @param client Client index to display to.
280 * @param handler Menu handler to use.
281 * @param time Time to hold menu for.
282 * @return True on success, false otherwise.
284 virtual bool SendDisplay(int client, IMenuHandler *handler, unsigned int time) =0;
287 * @brief Destroys the display object.
289 virtual void DeleteThis() =0;
292 * @brief Sets the selectable key map. Returns false if the function
295 * @param keymap A bit string where each bit N-1 specifies
296 * that key N is selectable (key 0 is bit 9).
297 * If the selectable key map is 0, it will be
298 * automatically set to allow 0.
299 * @return True on success, false if not supported.
301 virtual bool SetSelectableKeys(unsigned int keymap) =0;
304 * @brief Returns the current key position.
306 * @return Current key position starting at 1.
308 virtual unsigned int GetCurrentKey() =0;
311 * @brief Sets the next key position. This cannot be used
312 * to traverse backwards.
314 * @param key Key that is greater or equal to
316 * @return True on success, false otherwise.
318 virtual bool SetCurrentKey(unsigned int key) =0;
321 * @brief Returns the number of characters that can be added to the
322 * menu. The internal buffer is truncated if overflowed; this is for
323 * manual truncation/wrapping purposes.
325 * @return Number of bytes available. If the result is
326 * -1, then the panel has no text limit.
328 virtual int GetAmountRemaining() =0;
331 * @brief For the Handle system, returns approximate memory usage.
333 * @return Approximate number of bytes being used.
335 virtual unsigned int GetApproxMemUsage() =0;
339 * @brief Describes a "MenuStyle" system which manages
340 * menu drawing and construction.
346 * @brief Returns the style API version.
348 * @return API version.
350 virtual unsigned int GetStyleAPIVersion()
352 return SMINTERFACE_MENUMANAGER_VERSION;
356 * @brief Returns the name of the menu style.
358 * @return String containing the style name.
360 virtual const char *GetStyleName() =0;
363 * @brief Creates an IMenuPanel object.
365 * Note: the object should be freed using ::DeleteThis.
367 * @return IMenuPanel object.
369 virtual IMenuPanel *CreatePanel() =0;
372 * @brief Creates an IBaseMenu object of this style.
374 * Note: the object should be freed using IBaseMenu::Destroy.
376 * @param handler IMenuHandler pointer.
377 * @param pOwner Optional IdentityToken_t owner for handle
379 * @return An IBaseMenu pointer.
381 virtual IBaseMenu *CreateMenu(IMenuHandler *handler, IdentityToken_t *pOwner=NULL) =0;
384 * @brief Returns the maximum number of items per page.
386 * Menu implementations must return >= 2. Styles with only 1 or 0
387 * items per page are not valid.
389 * @return Number of items per page.
391 virtual unsigned int GetMaxPageItems() =0;
394 * @brief Returns whether or not a client is viewing a menu.
396 * @param client Client index.
397 * @param object Optional pointer to retrieve menu object,
399 * @return MenuSource value.
401 virtual MenuSource GetClientMenu(int client, void **object) =0;
404 * @brief Cancels a client's menu.
406 * @param client Client index.
407 * @param autoIgnore If true, no menus can be created during
408 * the cancellation process.
409 * @return True if a menu was cancelled, false otherwise.
411 virtual bool CancelClientMenu(int client, bool autoIgnore=false) =0;
414 * @brief Returns a Handle the IMenuStyle object.
416 * @return Handle_t pointing to this object.
418 virtual Handle_t GetHandle() =0;
421 * @brief For the Handle system, returns approximate memory usage.
423 * @return Approximate number of bytes being used.
425 virtual unsigned int GetApproxMemUsage() =0;
429 * @brief High-level interface for building menus.
435 * @brief Appends an item to the end of a menu.
437 * @param info Item information string.
438 * @param draw Default drawing information.
439 * @return True on success, false on item limit reached.
441 virtual bool AppendItem(const char *info, const ItemDrawInfo &draw) =0;
444 * @brief Inserts an item into the menu before a certain position;
445 * the new item will be at the given position and all next items
448 * @param position Position, starting from 0.
449 * @param info Item information string.
450 * @param draw Default item draw info.
451 * @return True on success, false on invalid menu position
453 virtual bool InsertItem(unsigned int position, const char *info, const ItemDrawInfo &draw) =0;
456 * @brief Removes an item from the menu.
458 * @param position Position, starting from 0.
459 * @return True on success, false on invalid menu position.
461 virtual bool RemoveItem(unsigned int position) =0;
464 * @brief Removes all items from the menu.
466 virtual void RemoveAllItems() =0;
469 * @brief Returns an item's info.
471 * @param position Position, starting from 0.
472 * @param draw Optional pointer to store a draw information.
473 * @return Info string pointer, or NULL if position was invalid.
475 virtual const char *GetItemInfo(unsigned int position, ItemDrawInfo *draw) =0;
478 * @brief Returns the number of items.
480 * @return Number of items in the menu.
482 virtual unsigned int GetItemCount() =0;
485 * @brief Sets the menu's pagination,.
487 * If pagination is set to MENU_NO_PAGINATION, and the previous
488 * pagination was not MENU_NO_PAGINATION, then the MENUFLAG_BUTTON_EXIT
489 * is unset. It can be re-applied if desired.
491 * @param itemsPerPage Number of items per page, or MENU_NO_PAGINATION.
492 * @return True on success, false if itemsPerPage is too
495 virtual bool SetPagination(unsigned int itemsPerPage) =0;
498 * @brief Returns an item's pagination.
500 * @return Pagination setting.
502 virtual unsigned int GetPagination() =0;
505 * @brief Returns the menu style.
507 * @return Menu style.
509 virtual IMenuStyle *GetDrawStyle() =0;
512 * @brief Sets the menu's display title/message.
514 * @param message Message (format options allowed).
516 virtual void SetDefaultTitle(const char *message) =0;
519 * @brief Returns the menu's display/title message.
521 * @return Message string.
523 virtual const char *GetDefaultTitle() =0;
526 * @brief Sets an extended menu option.
528 * @param option Option type.
529 * @param valuePtr Pointer of the type expected by the option.
530 * @return True on success, false if option or value is not supported.
532 virtual bool SetExtOption(MenuOption option, const void *valuePtr) =0;
535 * @brief Creates a new IMenuPanel object using extended options specific
536 * to the IMenuStyle parent. Titles, items, etc, are not copied.
538 * Note: The object should be freed with IMenuPanel::DeleteThis.
540 * @return IMenuPanel pointer.
542 virtual IMenuPanel *CreatePanel() =0;
545 * @brief Sends the menu to a client.
547 * @param client Client index to display to.
548 * @param time Time to hold menu for.
549 * @param alt_handler Alternate IMenuHandler.
550 * @return True on success, false otherwise.
552 virtual bool Display(int client, unsigned int time, IMenuHandler *alt_handler=NULL) =0;
555 * @brief Destroys the menu and frees all associated resources.
557 * @param releaseHandle If true, the Handle will be released
558 * in the destructor. This should be set
559 * to true except for IHandleTypeDispatch
562 virtual void Destroy(bool releaseHandle=true) =0;
565 * @brief Cancels the menu on all client's displays. While the menu is
566 * being cancelled, the menu may not be re-displayed to any clients.
567 * If a vote menu is currently active, it will be cancelled as well.
569 * @return Number of menus cancelled.
571 virtual void Cancel() =0;
574 * @brief Returns the menu's Handle. The Handle is automatically
575 * removed when the menu is destroyed.
577 * @return Handle_t handle value.
579 virtual Handle_t GetHandle() =0;
582 * @brief Returns menu option flags.
584 * @return Menu option flags.
586 virtual unsigned int GetMenuOptionFlags() =0;
589 * @brief Sets menu option flags.
591 * @param flags Menu option flags.
593 virtual void SetMenuOptionFlags(unsigned int flags) =0;
596 * @brief Returns the menu's handler.
598 * @return IMenuHandler of the menu.
600 virtual IMenuHandler *GetHandler() =0;
603 * @brief Sends the menu to a client, starting from the given item number.
605 * Note: this API call was added in v13.
607 * @param client Client index to display to.
608 * @param time Time to hold menu for.
609 * @param start_item Starting item to draw.
610 * @param alt_handler Alternate IMenuHandler.
611 * @return True on success, false otherwise.
613 virtual bool DisplayAtItem(int client,
615 unsigned int start_item,
616 IMenuHandler *alt_handler=NULL) =0;
619 * @brief For the Handle system, returns approximate memory usage.
621 * @return Approximate number of bytes being used.
623 virtual unsigned int GetApproxMemUsage() =0;
627 * @brief Contains callbacks for menu actions.
633 * @brief Returns the menu api verison.
635 * @return Menu API version.
637 virtual unsigned int GetMenuAPIVersion2()
639 return SMINTERFACE_MENUMANAGER_VERSION;
643 * @brief A display/selection cycle has started.
645 * @param menu Menu pointer.
647 virtual void OnMenuStart(IBaseMenu *menu)
652 * @brief Called before a menu is being displayed. This is where
653 * you can set an alternate title on the menu.
655 * @param menu Menu pointer.
656 * @param client Client index.
657 * @param display IMenuPanel pointer.
659 virtual void OnMenuDisplay(IBaseMenu *menu, int client, IMenuPanel *display)
664 * @brief Called when an item is selected.
666 * @param menu Menu pointer.
667 * @param client Client that selected the item.
668 * @param item Item number.
670 virtual void OnMenuSelect(IBaseMenu *menu, int client, unsigned int item)
675 * @brief An active menu display was dropped from a client.
677 * @param menu Menu pointer.
678 * @param client Client that had the menu.
679 * @param reason Menu cancellation reason.
681 virtual void OnMenuCancel(IBaseMenu *menu, int client, MenuCancelReason reason)
686 * @brief A display/selection cycle has ended.
688 * @param menu Menu pointer.
689 * @param reason MenuEndReason reason.
691 virtual void OnMenuEnd(IBaseMenu *menu, MenuEndReason reason)
696 * @brief Called when the menu object is destroyed.
698 * @param menu Menu pointer.
700 virtual void OnMenuDestroy(IBaseMenu *menu)
705 * @brief Called when requesting how to render an item.
707 * @param menu Menu pointer.
708 * @param client Client index receiving the menu.
709 * @param item Item number in the menu.
710 * @param style ITEMSTYLE flags, by reference for modification.
712 virtual void OnMenuDrawItem(IBaseMenu *menu, int client, unsigned int item, unsigned int &style)
717 * @brief Called when drawing item text.
719 * @param menu Menu pointer.
720 * @param client Client index receiving the menu.
721 * @param panel Panel being used to draw the menu.
722 * @param item Item number in the menu.
723 * @param dr Item draw information.
724 * @return 0 to let the render algorithm decide how to draw, otherwise,
725 * the return value from panel->DrawItem should be returned.
727 virtual unsigned int OnMenuDisplayItem(IBaseMenu *menu,
731 const ItemDrawInfo &dr)
737 * @brief Called when a vote has been started and displayed to
738 * clients. This is called after OnMenuStart() and OnMenuDisplay(),
739 * but before OnMenuSelect().
741 * @param menu Menu pointer.
743 virtual void OnMenuVoteStart(IBaseMenu *menu)
748 * @brief Called when a vote ends. This is automatically called by the
749 * wrapper, and never needs to called from a style implementation.
751 * This function does not replace OnMenuEnd(), nor does it have the
752 * same meaning as OnMenuEnd(), meaning you should not destroy a menu
753 * while it is in this function.
755 * @param menu Menu pointer.
756 * @param results Menu vote results.
758 virtual void OnMenuVoteResults(IBaseMenu *menu, const menu_vote_result_t *results)
763 * @brief Called when a vote is cancelled. If this is called, then
764 * OnMenuVoteResults() will not be called. In both cases, OnMenuEnd will
767 * @param menu Menu pointer.
768 * @param reason VoteCancelReason reason.
770 virtual void OnMenuVoteCancel(IBaseMenu *menu, VoteCancelReason reason)
775 * @brief Call to set private handler stuff.
777 * @param option Option name.
778 * @param data Private data.
779 * @return True if set, false if invalid or unrecognized.
781 virtual bool OnSetHandlerOption(const char *option, const void *data)
787 * @brief Called when an item is selected.
789 * Note: This callback was added in v13. It is called after OnMenuSelect().
791 * @param menu Menu pointer.
792 * @param client Client that selected the item.
793 * @param item Item number.
794 * @param item_on_page The first item on the page the player was last
797 virtual void OnMenuSelect2(IBaseMenu *menu,
800 unsigned int item_on_page)
806 * @brief Manages menu creation and displaying.
808 class IMenuManager : public SMInterface
811 virtual const char *GetInterfaceName()
813 return SMINTERFACE_MENUMANAGER_NAME;
815 virtual unsigned int GetInterfaceVersion()
817 return SMINTERFACE_MENUMANAGER_VERSION;
819 virtual bool IsVersionCompatible(unsigned int version)
821 if (version < 11 || version > GetInterfaceVersion())
829 * @brief Finds a style by name.
831 * @param name Name of the style (case insensitive).
832 * @return IMenuStyle pointer, or NULL if not found.
834 virtual IMenuStyle *FindStyleByName(const char *name) =0;
837 * @brief Returns the default draw style Core is using.
839 * @return Menu style pointer.
841 virtual IMenuStyle *GetDefaultStyle() =0;
844 * @brief Given a set of menu states, converts it to an IMenuPanel object.
846 * The state parameter is both INPUT and OUTPUT.
847 * INPUT: menu, mh, firstItem, lastItem
848 * OUTPUT: display, firstItem, lastItem, slots
850 * @param client Client index.
851 * @param states Menu states.
852 * @param order Order to search for items.
853 * @return IMenuPanel pointer, or NULL if no items could be
854 * found in the IBaseMenu pointer, or NULL if any
855 * other error occurred. Any valid pointer must
856 * be freed using IMenuPanel::DeleteThis.
858 virtual IMenuPanel *RenderMenu(int client, menu_states_t &states, ItemOrder order) =0;
861 * @brief Cancels a menu. Calls IBaseMenu::Cancel() after doing some preparatory
862 * work. This should always be used instead of directly calling Cancel().
864 * @param menu IBaseMenu pointer.
866 virtual void CancelMenu(IBaseMenu *menu) =0;
869 * @brief Displays a menu as a vote.
871 * @param menu IBaseMenu pointer.
872 * @param num_clients Number of clients to display to.
873 * @param clients Client index array.
874 * @param max_time Maximum time to hold menu for.
875 * @param flags Vote flags.
876 * @return True on success, false if a vote is in progress.
878 virtual bool StartVote(IBaseMenu *menu,
879 unsigned int num_clients,
881 unsigned int max_time,
882 unsigned int flags=0) =0;
885 * @brief Returns whether or not a vote is in progress.
887 * @return True if a vote is in progress, false otherwise.
889 virtual bool IsVoteInProgress() =0;
892 * @brief Cancels the vote in progress. This calls IBaseMenu::Cancel().
894 virtual void CancelVoting() =0;
897 * @brief Returns the remaining vote delay from the last menu. This delay is
898 * a suggestion for all public votes, and is not enforced.
900 * @return Number of seconds to wait.
902 virtual unsigned int GetRemainingVoteDelay() =0;
905 * @brief Returns whether a client is in the "allowed to vote" pool determined
906 * by the initial call to StartVote().
908 * @param client Client index.
909 * @return True if client is allowed to vote, false on failure.
911 virtual bool IsClientInVotePool(int client) =0;
914 * @brief Redraws the current vote menu to a client in the voting pool.
916 * @param client Client index.
917 * @return True on success, false if client is not allowed to vote.
919 virtual bool RedrawClientVoteMenu(int client) =0;
922 * @brief Redraws the current vote menu to a client in the voting pool.
924 * @param client Client index.
925 * @param revotes True to allow revotes, false otherwise.
926 * @return True on success, false if client is not allowed to vote.
928 virtual bool RedrawClientVoteMenu2(int client, bool revotes) =0;
932 #endif //_INCLUDE_SOURCEMOD_MENU_SYSTEM_H_