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
|
//========= Copyright Valve Corporation, All rights reserved. ============//
//
// Purpose:
//
// $NoKeywords: $
//=============================================================================//
#ifndef C_TF_HINTMANAGER_H
#define C_TF_HINTMANAGER_H
#ifdef _WIN32
#pragma once
#endif
#include "shareddefs.h"
class C_TFBaseHint;
class KeyValues;
//-----------------------------------------------------------------------------
// Purpose:
//-----------------------------------------------------------------------------
class C_TFHintManager : public C_BaseEntity
{
DECLARE_CLASS( C_TFHintManager, C_BaseEntity );
public:
DECLARE_CLIENTCLASS();
C_TFHintManager( void );
~C_TFHintManager( void );
virtual void OnDataChanged( DataUpdateType_t updateType );
// Override think method
virtual void ClientThink( void );
// Add hint to list
C_TFBaseHint *AddHint( int hintID, const char *subsection, int entityIndex, int maxduplicates );
// Clear hints
void ClearHints( void );
// Complete specified hint
void CompleteHint( int hintID, bool visibleOnly );
// Determine ID of hint currently being shown to player
int GetCurrentHintID( void );
KeyValues *GetHintKeyValues( void );
KeyValues *GetHintDisplayStats( void );
// Zero out all counters
void ResetDisplayStats( void );
private:
// See how many of the type of hint are already being shown
int CountInstancesOfHintID( int hintID );
// Hint list
CUtlVector< C_TFBaseHint * > m_aHints;
KeyValues *m_pkvHintSystem;
KeyValues *m_pkvHintDisplayStats;
};
#include "tf_hints.h"
class C_TFBaseHint;
namespace vgui
{
class Panel;
}
class KeyValues;
// Use this when you want to allow an unlimited number of a certain type of hint
// Just a huge number of simultaneous duplicates allowed
#define HINTTYPE_NOLIMIT 5000
C_TFBaseHint *CreateGlobalHint( int hintid, const char *subsection = NULL, int entity = -1, int maxduplicates = 0 );
C_TFBaseHint *CreateGlobalHint_Panel( vgui::Panel *targetPanel, int hintid, const char *subsection = NULL, int entity = -1, int maxduplicates = 0 );
void DestroyGlobalHint( int hintid );
KeyValues *GetHintKeyValues( void );
KeyValues *GetHintDisplayStats( void );
// Returns true if hint system swallowed escape key
bool HintSystemEscapeKey( void );
#endif // C_TF_HINTMANAGER_H
|