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.

80 lines
2.4 KiB

  1. //========= Copyright � 1996-2006, Valve Corporation, All rights reserved. ============//
  2. //
  3. // Purpose:
  4. //
  5. // $NoKeywords: $
  6. //=============================================================================//
  7. #ifndef HUD_BASE_ACCOUNT_H
  8. #define HUD_BASE_ACCOUNT_H
  9. #ifdef _WIN32
  10. #pragma once
  11. #endif
  12. #include "hudelement.h"
  13. #include "hud_numericdisplay.h"
  14. using namespace vgui;
  15. class CHudBaseAccount : public CHudElement, public CHudNumericDisplay
  16. {
  17. public:
  18. DECLARE_CLASS_SIMPLE( CHudBaseAccount, CHudNumericDisplay );
  19. explicit CHudBaseAccount( const char *name );
  20. virtual bool ShouldDraw();
  21. virtual void Paint();
  22. virtual void LevelInit( void );
  23. virtual void Reset( void );
  24. virtual void ApplySchemeSettings(vgui::IScheme *pScheme);
  25. int GetNumberWidth(HFont font, int number);
  26. // How much money does the player have
  27. virtual int GetPlayerAccount( void ) { return 0; }
  28. // Which gun game weapon does the player have
  29. virtual int GetPlayerGunGameWeapon( void ) { return 1; }
  30. // Requires game-specific GetClientMode() call, push to derived class
  31. virtual vgui::AnimationController *GetAnimationController( void ) { Assert( 0 ); return NULL; }
  32. private:
  33. int m_iPreviousAccount;
  34. int m_iPreviousDelta;
  35. CHudTexture *m_pAccountIcon;
  36. CHudTexture *m_pMinusIcon;
  37. CHudTexture *m_pPlusIcon;
  38. Color m_clrRed;
  39. Color m_clrGreen;
  40. Color m_clrDeltaColor;
  41. CPanelAnimationVarAliasType( float, icon_xpos, "icon_xpos", "0", "proportional_float" );
  42. CPanelAnimationVarAliasType( float, icon_ypos, "icon_ypos", "0", "proportional_float" );
  43. CPanelAnimationVarAliasType( float, icon2_xpos, "icon2_xpos", "0", "proportional_float" );
  44. CPanelAnimationVarAliasType( float, icon2_ypos, "icon2_ypos", "0", "proportional_float" );
  45. CPanelAnimationVarAliasType( float, digit_xpos, "digit_xpos", "50", "proportional_float" );
  46. CPanelAnimationVarAliasType( float, digit_ypos, "digit_ypos", "2", "proportional_float" );
  47. CPanelAnimationVarAliasType( float, digit2_xpos, "digit2_xpos", "0", "proportional_float" );
  48. CPanelAnimationVarAliasType( float, digit2_ypos, "digit2_ypos", "0", "proportional_float" );
  49. CPanelAnimationVar( Color, m_Ammo2Color, "Ammo2Color", "0 0 0 0" );
  50. CPanelAnimationVar( Color, m_TextColor, "TextColor", "FgColor" );
  51. CPanelAnimationVar( vgui::HFont, m_hNumberFont, "NumberFont", "HudNumbers" );
  52. float m_flLastAnimationEnd;
  53. const char *m_pszLastAnimationName;
  54. const char *m_pszQueuedAnimationName;
  55. float icon_tall;
  56. float icon_wide;
  57. };
  58. #endif // HUD_BASE_ACCOUNT_H