summaryrefslogtreecommitdiff
path: root/game/client/hud_bitmapnumericdisplay.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/hud_bitmapnumericdisplay.h
downloadarchived-source-engine-2018-hl2-src-master.tar.xz
archived-source-engine-2018-hl2-src-master.zip
Diffstat (limited to 'game/client/hud_bitmapnumericdisplay.h')
-rw-r--r--game/client/hud_bitmapnumericdisplay.h51
1 files changed, 51 insertions, 0 deletions
diff --git a/game/client/hud_bitmapnumericdisplay.h b/game/client/hud_bitmapnumericdisplay.h
new file mode 100644
index 0000000..f35d753
--- /dev/null
+++ b/game/client/hud_bitmapnumericdisplay.h
@@ -0,0 +1,51 @@
+//========= Copyright Valve Corporation, All rights reserved. ============//
+//
+// Purpose:
+//
+//=============================================================================//
+
+#ifndef HUD_BITMAPNUMERICDISPLAY_H
+#define HUD_BITMAPNUMERICDISPLAY_H
+#ifdef _WIN32
+#pragma once
+#endif
+
+#include "hud_numericdisplay.h"
+
+class CHudBitmapNumericDisplay : public vgui::Panel
+{
+ DECLARE_CLASS_SIMPLE( CHudBitmapNumericDisplay, vgui::Panel );
+
+public:
+ CHudBitmapNumericDisplay(vgui::Panel *parent, const char *name);
+
+ void SetDisplayValue(int value);
+ void SetShouldDisplayValue(bool state);
+
+protected:
+ // vgui overrides
+ virtual void PaintBackground( void );
+ virtual void Paint();
+ void PaintNumbers(int xpos, int ypos, int value, Color col, int numSigDigits);
+ virtual void PaintNumbers(int xpos, int ypos, int value, Color col)
+ {
+ PaintNumbers(xpos, ypos, value, col, 1);
+ }
+
+ CPanelAnimationVar( float, m_flAlphaOverride, "Alpha", "255" );
+ CPanelAnimationVar( Color, m_TextColor, "TextColor", "FgColor" );
+ CPanelAnimationVar( float, m_flBlur, "Blur", "0" );
+
+ CPanelAnimationVarAliasType( float, digit_xpos, "digit_xpos", "0", "proportional_float" );
+ CPanelAnimationVarAliasType( float, digit_ypos, "digit_ypos", "0", "proportional_float" );
+ CPanelAnimationVarAliasType( float, digit_height, "digit_height", "16", "proportional_float" );
+
+private:
+
+ CHudTexture *m_pNumbers[10];
+
+ int m_iValue;
+ bool m_bDisplayValue;
+};
+
+#endif //HUD_BITMAPNUMERICDISPLAY_H \ No newline at end of file