Implemented
amb286 - .smx extension no longer required with "sm plugins load"
3 * ===============================================================
4 * SourceMod (C)2004-2007 AlliedModders LLC. All rights reserved.
5 * ===============================================================
7 * This file is not open source and may not be copied without explicit
8 * written permission of AlliedModders LLC. This file may not be redistributed
9 * in whole or significant part.
10 * For information, see LICENSE.txt or http://www.sourcemod.net/license.php
15 #ifndef _INCLUDE_MENUSTYLE_RADIO_H
16 #define _INCLUDE_MENUSTYLE_RADIO_H
18 #include "sm_globals.h"
19 #include "MenuManager.h"
20 #include "MenuStyle_Base.h"
21 #include "sourcemm_api.h"
22 #include <IPlayerHelpers.h>
23 #include <IUserMessages.h>
24 #include "sm_fastlink.h"
27 using namespace SourceMod;
35 public IUserMessageListener
39 public: //SMGlobalClass
40 void OnSourceModLevelChange(const char *mapName);
41 void OnSourceModShutdown();
42 public: //BaseMenuStyle
43 CBaseMenuPlayer *GetMenuPlayer(int client);
44 void SendDisplay(int client, IMenuPanel *display);
46 const char *GetStyleName();
47 IMenuPanel *CreatePanel();
48 IBaseMenu *CreateMenu(IMenuHandler *pHandler, IdentityToken_t *pOwner);
49 unsigned int GetMaxPageItems();
50 public: //IUserMessageListener
51 void OnUserMessage(int msg_id, bf_write *bf, IRecipientFilter *pFilter);
52 void OnUserMessageSent(int msg_id);
55 bool OnClientCommand(int client);
57 CRadioDisplay *MakeRadioDisplay(CRadioMenu *menu=NULL);
58 void FreeRadioDisplay(CRadioDisplay *display);
60 CBaseMenuPlayer *m_players;
61 CStack<CRadioDisplay *> m_FreeDisplays;
64 class CRadioDisplay : public IMenuPanel
66 friend class CRadioStyle;
69 CRadioDisplay(CRadioMenu *menu);
71 IMenuStyle *GetParentStyle();
73 void DrawTitle(const char *text, bool onlyIfEmpty=false);
74 unsigned int DrawItem(const ItemDrawInfo &item);
75 bool DrawRawLine(const char *rawline);
76 bool SetExtOption(MenuOption option, const void *valuePtr);
77 bool CanDrawItem(unsigned int drawFlags);
78 bool SendDisplay(int client, IMenuHandler *handler, unsigned int time);
80 void SendRawDisplay(int client, unsigned int time);
84 unsigned int m_NextPos;
88 class CRadioMenu : public CBaseMenu
91 CRadioMenu(IMenuHandler *pHandler, IdentityToken_t *pOwner);
93 bool SetExtOption(MenuOption option, const void *valuePtr);
94 IMenuPanel *CreatePanel();
95 bool Display(int client, unsigned int time);
96 void Cancel_Finally();
99 extern CRadioStyle g_RadioMenuStyle;
101 #endif //_INCLUDE_MENUSTYLE_RADIO_H