summaryrefslogtreecommitdiff
path: root/game/server/tf2/menu_base.h
blob: 45662965e8653c871d96b2f9d3ce9cebc6891f68 (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
//========= Copyright Valve Corporation, All rights reserved. ============//
//
// Purpose: 
//
// $Workfile:     $
// $Date:         $
//
//-----------------------------------------------------------------------------
// $Log: $
//
// $NoKeywords: $
//=============================================================================//

#ifndef MENU_BASE_H
#define MENU_BASE_H
#pragma once

class CBasePlayer;
class CMenu;

enum
{
	MENU_DEFAULT = 0,
	MENU_TEAM,
	MENU_CLASS,

	// Insert new Menus here
	MENU_LAST,					// Total Number of menus
};

// Global list of menus
extern CMenu	*gMenus[];

//-----------------------------------------------------------------------------
// Purpose: Base Menu Class
//-----------------------------------------------------------------------------
class CMenu
{
public:
	CMenu();

	virtual void RecalculateMenu( CBaseTFPlayer *pViewer );
	virtual void Display( CBaseTFPlayer *pViewer, int allowed = 0xFFFF, int display_time = -1 );
	virtual bool Input( CBaseTFPlayer *pViewer, int iInput );

protected:
	char	m_szMenuString[1024];
};


//-----------------------------------------------------------------------------
// Purpose: Team Menu
//-----------------------------------------------------------------------------
class CMenuTeam : public CMenu
{
public:
	CMenuTeam();

	virtual void RecalculateMenu( CBaseTFPlayer *pViewer );
	virtual bool Input( CBaseTFPlayer *pViewer, int iInput );
};


//-----------------------------------------------------------------------------
// Purpose: Class Menu
//-----------------------------------------------------------------------------
class CMenuClass : public CMenu
{
public:
	CMenuClass();

	virtual void RecalculateMenu( CBaseTFPlayer *pViewer );
	virtual bool Input( CBaseTFPlayer *pViewer, int iInput );
};


#endif // MENU_BASE_H