summaryrefslogtreecommitdiff
path: root/game/client/tf/tf_hud_training.h
blob: 7e9a470e90f4b5014f29b9b43ebe58cba9ce042a (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
//========= Copyright Valve Corporation, All rights reserved. ============//
//
// Purpose: 
//
// $NoKeywords: $
//=============================================================================//

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

#include <vgui_controls/EditablePanel.h>
#include <vgui_controls/ImagePanel.h>
#include "tf_controls.h"
#include "GameEventListener.h"
#include "c_tf_objective_resource.h"
#include "IconPanel.h"
#include "tf_gamerules.h"
#include "proxyentity.h"
#include "materialsystem/imaterial.h"
#include "materialsystem/imaterialvar.h"

#define MAX_TRAINING_MSG_LENGTH 512

extern int Training_GetCompletedTrainingClasses();
extern void Training_MarkClassComplete( int iClass, int iStage );

//-----------------------------------------------------------------------------
// Purpose:  
//-----------------------------------------------------------------------------
class CTFHudTraining : public vgui::EditablePanel, public CGameEventListener
{
	DECLARE_CLASS_SIMPLE( CTFHudTraining, vgui::EditablePanel );

public:

	CTFHudTraining( vgui::Panel *parent, const char *name );
	virtual ~CTFHudTraining();

	static bool   FormatTrainingText( const char* input, wchar_t* output );

	virtual void  ApplySchemeSettings( vgui::IScheme *pScheme );
	virtual void  Reset();
	virtual void  FireGameEvent( IGameEvent *event );
	virtual bool  IsVisible( void );
	virtual void  OnTick();

	void          SetTrainingText( char *msg );
	void          SetTrainingObjective( char *msg );

private:

	CExRichText		*m_pMsgLabel;
	CExLabel		*m_pPressSpacebarToContinueLabel;
};


#endif	// TF_HUD_TRAINING_H