summaryrefslogtreecommitdiff
path: root/game/client/dod/dod_hud_playerstatus_mgheat.h
diff options
context:
space:
mode:
authorFluorescentCIAAfricanAmerican <[email protected]>2020-04-22 12:56:21 -0400
committerFluorescentCIAAfricanAmerican <[email protected]>2020-04-22 12:56:21 -0400
commit3bf9df6b2785fa6d951086978a3e66f49427166a (patch)
tree2c0f1f0c63c4832882bc93814ebd2c2b1c6224e5 /game/client/dod/dod_hud_playerstatus_mgheat.h
downloadarchived-source-engine-2018-hl2-src-master.tar.xz
archived-source-engine-2018-hl2-src-master.zip
Diffstat (limited to 'game/client/dod/dod_hud_playerstatus_mgheat.h')
-rw-r--r--game/client/dod/dod_hud_playerstatus_mgheat.h95
1 files changed, 95 insertions, 0 deletions
diff --git a/game/client/dod/dod_hud_playerstatus_mgheat.h b/game/client/dod/dod_hud_playerstatus_mgheat.h
new file mode 100644
index 0000000..78573b8
--- /dev/null
+++ b/game/client/dod/dod_hud_playerstatus_mgheat.h
@@ -0,0 +1,95 @@
+//========= Copyright Valve Corporation, All rights reserved. ============//
+//
+// Purpose:
+//
+// $NoKeywords: $
+//=============================================================================//
+
+#ifndef DOD_HUD_PLAYERSTATUS_MGHEAT_H
+#define DOD_HUD_PLAYERSTATUS_MGHEAT_H
+#ifdef _WIN32
+#pragma once
+#endif
+
+//-----------------------------------------------------------------------------
+// Purpose: MGHeat progress bar
+//-----------------------------------------------------------------------------
+class CDoDHudMGHeatProgressBar : public vgui::Panel
+{
+ DECLARE_CLASS_SIMPLE( CDoDHudMGHeatProgressBar, vgui::Panel );
+
+public:
+ CDoDHudMGHeatProgressBar( vgui::Panel *parent, const char *name ) : vgui::Panel( parent, name ){}
+
+ virtual void Paint();
+ virtual void ApplySchemeSettings( vgui::IScheme *pScheme );
+ void SetPercentage( float flPercentage ){ m_flPercentage = flPercentage; }
+
+private:
+
+ float m_flPercentage;
+
+ Color m_clrActive;
+ Color m_clrActiveLow;
+ Color m_clrInactive;
+ Color m_clrInactiveLow;
+
+ CPanelAnimationVarAliasType( float, m_flSliceWidth, "slice_width", "5", "proportional_float" );
+ CPanelAnimationVarAliasType( float, m_flSliceSpacer, "slice_spacer", "2", "proportional_float" );
+ CPanelAnimationVar( float, m_flWarningLevel, "warning_level", "0.75" );
+};
+
+//-----------------------------------------------------------------------------
+// Purpose: MGHeat icon
+//-----------------------------------------------------------------------------
+class CDoDHudMGHeatIcon : public vgui::ImagePanel
+{
+ DECLARE_CLASS_SIMPLE( CDoDHudMGHeatIcon, vgui::ImagePanel );
+
+public:
+ CDoDHudMGHeatIcon( vgui::Panel *parent, const char *name ) : vgui::ImagePanel( parent, name ){};
+
+ void Init( void );
+ virtual void Paint();
+ virtual void ApplySettings( KeyValues *inResourceData );
+ virtual void ApplySchemeSettings( vgui::IScheme *pScheme );
+ void SetType( int nType );
+ void SetPercentage( float flPercentage ){ m_flPercentage = flPercentage; }
+
+private:
+
+ float m_flPercentage;
+ CHudTexture *m_icon;
+
+ CPanelAnimationVar( float, m_flWarningLevel, "warning_level", "0.75" );
+
+// char m_szIcon30cal[128];
+ char m_szIconMg42[128];
+
+ int m_nType;
+ Color m_clrActive;
+ Color m_clrActiveLow;
+};
+
+//-----------------------------------------------------------------------------
+// Purpose: MGHeat panel
+//-----------------------------------------------------------------------------
+class CDoDHudMGHeat : public vgui::EditablePanel
+{
+ DECLARE_CLASS_SIMPLE( CDoDHudMGHeat, vgui::EditablePanel );
+
+public:
+ CDoDHudMGHeat( vgui::Panel *parent, const char *name );
+
+ virtual void ApplySchemeSettings( vgui::IScheme *pScheme );
+ virtual void OnThink();
+ virtual void SetVisible( bool state );
+
+private:
+
+ CDoDCutEditablePanel *m_pBackground;
+ CDoDHudMGHeatIcon *m_pIcon;
+ CDoDHudMGHeatProgressBar *m_pProgressBar;
+};
+
+#endif // DOD_HUD_PLAYERSTATUS_MGHEAT_H \ No newline at end of file