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
|
//========= Copyright Valve Corporation, All rights reserved. ============//
//
// Purpose:
//
//=============================================================================//
#ifndef HUD_PDUMP_H
#define HUD_PDUMP_H
#ifdef _WIN32
#pragma once
#endif
#include <vgui_controls/Panel.h>
#include "hudelement.h"
namespace vgui
{
class IScheme;
};
class CPDumpPanel : public CHudElement, public vgui::Panel
{
DECLARE_CLASS_SIMPLE( CPDumpPanel, vgui::Panel );
public:
enum
{
DUMP_CLASSNAME_SIZE = 128,
DUMP_STRING_SIZE = 128,
};
CPDumpPanel( const char *pElementName );
~CPDumpPanel();
DECLARE_MULTIPLY_INHERITED();
virtual void ApplySettings( KeyValues *inResourceData );
virtual void ApplySchemeSettings( vgui::IScheme *pScheme );
virtual void Paint( void );
virtual bool ShouldDraw();
// Remove dump info
void Clear();
void DumpEntity( C_BaseEntity *ent, int commands_acknowledged );
void DumpComparision( const char *classname, const char *fieldname, const char *fieldtype,
bool networked, bool noterrorchecked, bool differs, bool withintolerance, const char *value );
private:
void PredictionDumpColor( bool networked, bool errorchecked, bool differs, bool withintolerance,
int& r, int& g, int& b, int& a );
//-----------------------------------------------------------------------------
// Purpose: Stores some info about the various fields of an entity for display
//-----------------------------------------------------------------------------
struct DumpInfo
{
char classname[ DUMP_CLASSNAME_SIZE ];
bool networked;
char fieldstring[ DUMP_STRING_SIZE ];
bool differs;
bool withintolerance;
bool noterrorchecked;
};
CUtlVector< DumpInfo > m_DumpEntityInfo;
EHANDLE m_hDumpEntity;
CPanelAnimationVar( vgui::HFont, m_FontSmall, "ItemFont", "DefaultVerySmall" );
CPanelAnimationVar( vgui::HFont, m_FontMedium, "LabelFont", "DefaultSmall" );
CPanelAnimationVar( vgui::HFont, m_FontBig, "TitleFont", "Trebuchet24" );
};
CPDumpPanel *GetPDumpPanel();
#endif // HUD_PDUMP_H
|