1
0
mirror of https://github.com/alliedmodders/hl2sdk.git synced 2024-12-23 01:59:43 +08:00
hl2sdk/game/client/game_controls/buysubmenu.h
2013-06-26 15:22:04 -07:00

60 lines
1.6 KiB
C++

//========= Copyright Valve Corporation, All rights reserved. ============//
//
// Purpose:
//
// $NoKeywords: $
//=============================================================================//
#ifndef BUYSUBMENU_H
#define BUYSUBMENU_H
#ifdef _WIN32
#pragma once
#endif
#include <vgui_controls/WizardSubPanel.h>
#include <vgui_controls/Button.h>
#include <utlvector.h>
#include "mouseoverpanelbutton.h"
class CBuyMenu;
//-----------------------------------------------------------------------------
// Purpose: Draws the class menu
//-----------------------------------------------------------------------------
class CBuySubMenu : public vgui::WizardSubPanel
{
private:
DECLARE_CLASS_SIMPLE( CBuySubMenu, vgui::WizardSubPanel );
public:
CBuySubMenu(vgui::Panel *parent,const char *name = "BuySubMenu");
~CBuySubMenu();
virtual void SetVisible( bool state );
virtual void DeleteSubPanels();
protected:
// command callbacks
virtual void OnCommand( const char *command );
virtual vgui::WizardSubPanel *GetNextSubPanel(); // this is the last menu in the list
virtual vgui::Panel *CreateControlByName(const char *controlName);
virtual CBuySubMenu* CreateNewSubMenu();
virtual MouseOverPanelButton* CreateNewMouseOverPanelButton(vgui::EditablePanel *panel);
typedef struct
{
char filename[_MAX_PATH];
CBuySubMenu *panel;
} SubMenuEntry_t;
vgui::EditablePanel *m_pPanel;
MouseOverPanelButton *m_pFirstButton;
CUtlVector<SubMenuEntry_t> m_SubMenus; // a cache of buy submenus, so we don't need to construct them each time
vgui::WizardSubPanel *m_NextPanel;
};
#endif // BUYSUBMENU_H