summaryrefslogtreecommitdiff
path: root/game/client/cstrike/VGUI/cstrikeclassmenu.h
blob: 96a991f2df7e9cd5a9a57df0734131da82ccfcbd (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
//========= Copyright Valve Corporation, All rights reserved. ============//
//
// Purpose: 
//
// $NoKeywords: $
//=============================================================================//

#ifndef CSCLASSMENU_H
#define CSCLASSMENU_H
#ifdef _WIN32
#pragma once
#endif

#include <classmenu.h>
#include <vgui_controls/EditablePanel.h>
#include <filesystem.h>
#include <cs_shareddefs.h>
#include "cbase.h"
#include "cs_gamerules.h"
#include "vgui_controls/ImagePanel.h"
#include "backgroundpanel.h"

using namespace vgui;


//-----------------------------------------------------------------------------
// These are maintained in a list so the renderer can draw a 3D character
// model on top of them.
//-----------------------------------------------------------------------------

class CCSClassImagePanel : public vgui::ImagePanel
{
public:

	typedef vgui::ImagePanel BaseClass;

	CCSClassImagePanel( vgui::Panel *pParent, const char *pName );
	virtual ~CCSClassImagePanel();
	virtual void ApplySettings( KeyValues *inResourceData );
	virtual void Paint();


public:
	char m_ModelName[128];
};

extern CUtlVector<CCSClassImagePanel*> g_ClassImagePanels;


//-----------------------------------------------------------------------------
// Purpose: Draws the Terrorist class menu
//-----------------------------------------------------------------------------

class CClassMenu_TER : public CClassMenu
{
private:
	DECLARE_CLASS_SIMPLE( CClassMenu_TER, CClassMenu );

	// Background panel -------------------------------------------------------

public:
	virtual void PaintBackground();
	virtual void PerformLayout();
	virtual void ApplySchemeSettings( vgui::IScheme *pScheme );
	bool m_backgroundLayoutFinished;

	// End background panel ---------------------------------------------------
	
public:
	CClassMenu_TER(IViewPort *pViewPort);
	virtual Panel* CreateControlByName(const char *controlName);
	const char *GetName( void );
	void ShowPanel(bool bShow);
	void Update();
	virtual void SetVisible(bool state);
};


//-----------------------------------------------------------------------------
// Purpose: Draws the Counter-Terrorist class menu
//-----------------------------------------------------------------------------

class CClassMenu_CT : public CClassMenu
{
private:
	DECLARE_CLASS_SIMPLE( CClassMenu_CT, CClassMenu );

	// Background panel -------------------------------------------------------

public:
	virtual void PaintBackground();
	virtual void PerformLayout();
	virtual void ApplySchemeSettings( vgui::IScheme *pScheme );
	bool m_backgroundLayoutFinished;

	// End background panel ---------------------------------------------------
	
public:
	CClassMenu_CT(IViewPort *pViewPort);
	virtual Panel *CreateControlByName(const char *controlName);
	const char *GetName( void );
	void ShowPanel(bool bShow);
	void Update();
	virtual void SetVisible(bool state);
};

#endif // CSCLASSMENU_H