diff options
| author | FluorescentCIAAfricanAmerican <[email protected]> | 2020-04-22 12:56:21 -0400 |
|---|---|---|
| committer | FluorescentCIAAfricanAmerican <[email protected]> | 2020-04-22 12:56:21 -0400 |
| commit | 3bf9df6b2785fa6d951086978a3e66f49427166a (patch) | |
| tree | 2c0f1f0c63c4832882bc93814ebd2c2b1c6224e5 /game/client/hud_pdump.h | |
| download | archived-source-engine-2018-hl2-src-master.tar.xz archived-source-engine-2018-hl2-src-master.zip | |
Diffstat (limited to 'game/client/hud_pdump.h')
| -rw-r--r-- | game/client/hud_pdump.h | 78 |
1 files changed, 78 insertions, 0 deletions
diff --git a/game/client/hud_pdump.h b/game/client/hud_pdump.h new file mode 100644 index 0000000..83af436 --- /dev/null +++ b/game/client/hud_pdump.h @@ -0,0 +1,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 |