1.1 --- a/core/MenuStyle_Valve.h Sun May 13 00:42:39 2007 +0000
1.2 +++ b/core/MenuStyle_Valve.h Sun May 13 03:38:36 2007 +0000
1.3 @@ -20,23 +20,17 @@
1.4 #include "MenuStyle_Base.h"
1.5 #include "sourcemm_api.h"
1.6 #include "KeyValues.h"
1.7 -#include <IPlayerHelpers.h>
1.8 #include "sm_fastlink.h"
1.9
1.10 using namespace SourceMod;
1.11
1.12 -class CValveMenuPlayer
1.13 +class CValveMenuPlayer : public CBaseMenuPlayer
1.14 {
1.15 public:
1.16 - CValveMenuPlayer() : bInMenu(false), bAutoIgnore(false), curPrioLevel(1)
1.17 + CValveMenuPlayer() : curPrioLevel(1)
1.18 {
1.19 }
1.20 - menu_states_t states;
1.21 - bool bInMenu;
1.22 - bool bAutoIgnore;
1.23 int curPrioLevel;
1.24 - float menuStartTime;
1.25 - unsigned int menuHoldTime;
1.26 };
1.27
1.28 class CValveMenu;
1.29 @@ -44,37 +38,29 @@
1.30
1.31 class ValveMenuStyle :
1.32 public SMGlobalClass,
1.33 - public IMenuStyle,
1.34 - public IClientListener
1.35 + public BaseMenuStyle
1.36 {
1.37 public:
1.38 ValveMenuStyle();
1.39 - bool DoClientMenu(int client, CValveMenu *menu, IMenuHandler *mh, unsigned int time);
1.40 - bool DoClientMenu(int client, CValveMenuDisplay *menu, IMenuHandler *mh, unsigned int time);
1.41 - void ClientPressedKey(int client, unsigned int key_press);
1.42 bool OnClientCommand(int client);
1.43 - void CancelMenu(CValveMenu *menu);
1.44 - void ProcessWatchList();
1.45 +public: //BaseMenuStyle
1.46 + CBaseMenuPlayer *GetMenuPlayer(int client);
1.47 + void SendDisplay(int client, IMenuDisplay *display);
1.48 + bool DoClientMenu(int client, CBaseMenu *menu, IMenuHandler *mh, unsigned int time);
1.49 + bool DoClientMenu(int client, IMenuDisplay *menu, IMenuHandler *mh, unsigned int time);
1.50 public: //SMGlobalClass
1.51 void OnSourceModAllInitialized();
1.52 void OnSourceModShutdown();
1.53 void OnSourceModVSPReceived(IServerPluginCallbacks *iface);
1.54 -public: //IClientListener
1.55 - void OnClientDisconnected(int client);
1.56 public: //IMenuStyle
1.57 const char *GetStyleName();
1.58 IMenuDisplay *CreateDisplay();
1.59 IBaseMenu *CreateMenu();
1.60 unsigned int GetMaxPageItems();
1.61 - MenuSource GetClientMenu(int client, void **object);
1.62 - bool CancelClientMenu(int client, bool autoIgnore=false);
1.63 private:
1.64 - bool RedoClientMenu(int client, ItemOrder order);
1.65 void HookCreateMessage(edict_t *pEdict, DIALOG_TYPE type, KeyValues *kv, IServerPluginCallbacks *plugin);
1.66 - void _CancelMenu(int client, bool bAutoIgnore=false, MenuCancelReason reason=MenuCancel_Interrupt);
1.67 private:
1.68 CValveMenuPlayer *m_players;
1.69 - FastLink<int> m_WatchList;
1.70 };
1.71
1.72 class CValveMenu;
1.73 @@ -113,13 +99,10 @@
1.74 bool SetExitButton(bool set);
1.75 bool SetPagination(unsigned int itemsPerPage);
1.76 bool Display(int client, IMenuHandler *handler, unsigned int time);
1.77 - void Cancel();
1.78 - void Destroy();
1.79 + void Cancel_Finally();
1.80 private:
1.81 Color m_IntroColor;
1.82 char m_IntroMsg[128];
1.83 - bool m_bCancelling;
1.84 - bool m_bShouldDelete;
1.85 };
1.86
1.87 extern ValveMenuStyle g_ValveMenuStyle;