Update CS:GO team score gamedata.
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_MENUMANAGER_H_
33 #define _INCLUDE_SOURCEMOD_MENUMANAGER_H_
35 #include <IMenuManager.h>
36 #include <sh_vector.h>
39 #include <sh_string.h>
40 #include "sm_globals.h"
42 using namespace SourceMod;
43 using namespace SourceHook;
48 public IHandleTypeDispatch
50 friend class BroadcastHandler;
51 friend class VoteHandler;
52 friend class CBaseMenu;
53 friend class BaseMenuStyle;
56 public: //SMGlobalClass
57 void OnSourceModAllInitialized();
58 void OnSourceModAllShutdown();
59 ConfigResult OnSourceModConfigChanged(const char *key,
64 void OnSourceModLevelChange(const char *mapName);
65 public: //IMenuManager
66 virtual const char *GetInterfaceName()
68 return SMINTERFACE_MENUMANAGER_NAME;
70 virtual unsigned int GetInterfaceVersion()
72 return SMINTERFACE_MENUMANAGER_VERSION;
75 unsigned int GetStyleCount();
76 IMenuStyle *GetStyle(unsigned int index);
77 IMenuStyle *FindStyleByName(const char *name);
78 IMenuStyle *GetDefaultStyle();
79 void AddStyle(IMenuStyle *style);
80 bool SetDefaultStyle(IMenuStyle *style);
81 IMenuPanel *RenderMenu(int client, menu_states_t &states, ItemOrder order);
82 void CancelMenu(IBaseMenu *menu);
83 bool StartVote(IBaseMenu *menu,
84 unsigned int num_clients,
86 unsigned int max_time,
87 unsigned int flags=0);
88 bool IsVoteInProgress();
90 unsigned int GetRemainingVoteDelay();
91 bool IsClientInVotePool(int client);
92 bool RedrawClientVoteMenu(int client);
93 bool RedrawClientVoteMenu2(int client, bool revote);
94 public: //IHandleTypeDispatch
95 void OnHandleDestroy(HandleType_t type, void *object);
96 bool GetHandleApproxSize(HandleType_t type, void *object, unsigned int *pSize);
98 HandleError ReadMenuHandle(Handle_t handle, IBaseMenu **menu);
99 HandleError ReadStyleHandle(Handle_t handle, IMenuStyle **style);
101 bool MenuSoundsEnabled();
102 const char *GetMenuSound(ItemSelection sel);
104 Handle_t CreateMenuHandle(IBaseMenu *menu, IdentityToken_t *pOwner);
105 Handle_t CreateStyleHandle(IMenuStyle *style);
108 IMenuStyle *m_pDefaultStyle;
109 CVector<IMenuStyle *> m_Styles;
110 HandleType_t m_StyleType;
111 HandleType_t m_MenuType;
112 String m_SelectSound;
113 String m_ExitBackSound;
117 extern MenuManager g_Menus;
119 #endif //_INCLUDE_SOURCEMOD_MENUMANAGER_H_