Update CS:GO team score gamedata.
2 * vim: set ts=4 sw=4 tw=99 noet :
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_MENUSTYLE_BASE_H
33 #define _INCLUDE_MENUSTYLE_BASE_H
35 #include <IMenuManager.h>
36 #include <IPlayerHelpers.h>
37 #include <am-string.h>
38 #include <am-vector.h>
39 #include "sm_fastlink.h"
41 using namespace SourceMod;
51 CItem(ke::Moveable<CItem> other)
52 : info(ke::Move(other->info)),
53 display(ke::Move(other->display))
56 access = other->access;
58 CItem & operator =(ke::Moveable<CItem> other)
60 info = ke::Move(other->info);
61 display = ke::Move(other->display);
63 access = other->access;
69 ke::AutoPtr<ke::AString> display;
74 CItem(const CItem &other) KE_DELETE;
75 CItem &operator =(const CItem &other) KE_DELETE;
81 CBaseMenuPlayer() : bInMenu(false), bAutoIgnore(false), bInExternMenu(false)
88 unsigned int menuHoldTime;
96 public IClientListener
101 bool CancelClientMenu(int client, bool autoIgnore/* =false */);
102 MenuSource GetClientMenu(int client, void **object);
103 Handle_t GetHandle();
104 public: //IClientListener
105 void OnClientDisconnected(int client);
106 public: //what derived must implement
107 virtual CBaseMenuPlayer *GetMenuPlayer(int client) =0;
108 virtual void SendDisplay(int client, IMenuPanel *display) =0;
109 public: //what derived may implement
110 virtual bool DoClientMenu(int client,
112 unsigned int first_item,
115 virtual bool DoClientMenu(int client, IMenuPanel *menu, IMenuHandler *mh, unsigned int time);
116 virtual void AddClientToWatch(int client);
117 virtual void RemoveClientFromWatch(int client);
118 virtual void ProcessWatchList();
120 void CancelMenu(CBaseMenu *menu);
121 void ClientPressedKey(int client, unsigned int key_press);
123 void _CancelClientMenu(int client, MenuCancelReason reason, bool bAutoIgnore=false);
124 bool RedoClientMenu(int client, ItemOrder order);
126 FastLink<int> m_WatchList;
130 class CBaseMenu : public IBaseMenu
133 CBaseMenu(IMenuHandler *pHandler, IMenuStyle *pStyle, IdentityToken_t *pOwner);
134 virtual ~CBaseMenu();
136 virtual bool AppendItem(const char *info, const ItemDrawInfo &draw);
137 virtual bool InsertItem(unsigned int position, const char *info, const ItemDrawInfo &draw);
138 virtual bool RemoveItem(unsigned int position);
139 virtual void RemoveAllItems();
140 virtual const char *GetItemInfo(unsigned int position, ItemDrawInfo *draw=NULL);
141 virtual unsigned int GetItemCount();
142 virtual bool SetPagination(unsigned int itemsPerPage);
143 virtual unsigned int GetPagination();
144 virtual IMenuStyle *GetDrawStyle();
145 virtual void SetDefaultTitle(const char *message);
146 virtual const char *GetDefaultTitle();
147 virtual void Cancel();
148 virtual void Destroy(bool releaseHandle);
149 virtual void Cancel_Finally() =0;
150 virtual Handle_t GetHandle();
151 virtual unsigned int GetMenuOptionFlags();
152 virtual void SetMenuOptionFlags(unsigned int flags);
153 virtual IMenuHandler *GetHandler();
154 unsigned int GetBaseMemUsage();
156 void InternalDelete();
159 IMenuStyle *m_pStyle;
160 unsigned int m_Pagination;
161 ke::Vector<CItem> m_items;
162 bool m_bShouldDelete;
164 IdentityToken_t *m_pOwner;
166 bool m_bWillFreeHandle;
168 IMenuHandler *m_pHandler;
169 unsigned int m_nFlags;
172 #endif //_INCLUDE_MENUSTYLE_BASE_H