diff options
| author | Joe Ludwig <[email protected]> | 2013-06-26 15:22:04 -0700 |
|---|---|---|
| committer | Joe Ludwig <[email protected]> | 2013-06-26 15:22:04 -0700 |
| commit | 39ed87570bdb2f86969d4be821c94b722dc71179 (patch) | |
| tree | abc53757f75f40c80278e87650ea92808274aa59 /mp/src/game/client/hud_pdump.h | |
| download | source-sdk-2013-39ed87570bdb2f86969d4be821c94b722dc71179.tar.xz source-sdk-2013-39ed87570bdb2f86969d4be821c94b722dc71179.zip | |
First version of the SOurce SDK 2013
Diffstat (limited to 'mp/src/game/client/hud_pdump.h')
| -rw-r--r-- | mp/src/game/client/hud_pdump.h | 78 |
1 files changed, 78 insertions, 0 deletions
diff --git a/mp/src/game/client/hud_pdump.h b/mp/src/game/client/hud_pdump.h new file mode 100644 index 00000000..f62a65d2 --- /dev/null +++ b/mp/src/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
|