Counter Strike : Global Offensive Source Code
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

50 lines
1.4 KiB

  1. //========= Copyright � 1996-2005, Valve Corporation, All rights reserved. ============//
  2. //
  3. // Purpose:
  4. //
  5. //=============================================================================//
  6. #ifndef HUD_BITMAPNUMERICDISPLAY_H
  7. #define HUD_BITMAPNUMERICDISPLAY_H
  8. #ifdef _WIN32
  9. #pragma once
  10. #endif
  11. #include "hud_numericdisplay.h"
  12. class CHudBitmapNumericDisplay : public vgui::Panel
  13. {
  14. DECLARE_CLASS_SIMPLE( CHudBitmapNumericDisplay, vgui::Panel );
  15. public:
  16. CHudBitmapNumericDisplay(vgui::Panel *parent, const char *name);
  17. void SetDisplayValue(int value);
  18. void SetShouldDisplayValue(bool state);
  19. protected:
  20. // vgui overrides
  21. virtual void PaintBackground( void );
  22. virtual void Paint();
  23. void PaintNumbers(int xpos, int ypos, int value, Color col, int numSigDigits);
  24. virtual void PaintNumbers(int xpos, int ypos, int value, Color col)
  25. {
  26. PaintNumbers(xpos, ypos, value, col, 1);
  27. }
  28. CPanelAnimationVar( float, m_flAlphaOverride, "Alpha", "255" );
  29. CPanelAnimationVar( Color, m_TextColor, "TextColor", "FgColor" );
  30. CPanelAnimationVar( float, m_flBlur, "Blur", "0" );
  31. CPanelAnimationVarAliasType( float, digit_xpos, "digit_xpos", "0", "proportional_float" );
  32. CPanelAnimationVarAliasType( float, digit_ypos, "digit_ypos", "0", "proportional_float" );
  33. CPanelAnimationVarAliasType( float, digit_height, "digit_height", "16", "proportional_float" );
  34. private:
  35. CHudTexture *m_pNumbers[10];
  36. int m_iValue;
  37. bool m_bDisplayValue;
  38. };
  39. #endif //HUD_BITMAPNUMERICDISPLAY_H