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.

79 lines
2.3 KiB

  1. //========= Copyright � 1996-2005, Valve Corporation, All rights reserved. ============//
  2. //
  3. // Purpose: Displays HUD elements about health and armor
  4. //
  5. //=====================================================================================//
  6. #ifndef SFHUDWEAPONPANEL_H_
  7. #define SFHUDWEAPONPANEL_H_
  8. #include "hud.h"
  9. #include "hud_element_helper.h"
  10. #include "scaleformui/scaleformui.h"
  11. #include "sfhudflashinterface.h"
  12. #include "cs_gamerules.h"
  13. #include "c_cs_player.h"
  14. class SFHudWeaponPanel : public SFHudFlashInterface
  15. {
  16. public:
  17. explicit SFHudWeaponPanel( const char *value );
  18. virtual ~SFHudWeaponPanel();
  19. // These overload the CHudElement class
  20. virtual void ProcessInput( void );
  21. virtual void LevelInit( void );
  22. virtual void LevelShutdown( void );
  23. virtual void SetActive( bool bActive );
  24. virtual bool ShouldDraw( void );
  25. virtual void Init( void ) { SetVisible( true ); }
  26. virtual void Reset( void ) { SetVisible( true ); }
  27. // these overload the ScaleformFlashInterfaceMixin class
  28. virtual void FlashReady( void );
  29. virtual bool PreUnloadFlash( void );
  30. virtual void FireGameEvent( IGameEvent *event );
  31. protected:
  32. void ShowPanel( bool value );
  33. void SetVisible( bool bVisible );
  34. void LockSlot( bool wantItLocked, bool& currentlyLocked );
  35. protected:
  36. SFVALUE m_PanelHandle;
  37. SFVALUE m_CurrentWeaponImageHandle;
  38. SFVALUE m_CurrentWeaponTextHandle;
  39. SFVALUE m_AmmoTextClipHandle;
  40. SFVALUE m_AmmoTextTotalHandle;
  41. SFVALUE m_AmmoAnimationHandle;
  42. SFVALUE m_BurstIcons_Burst;
  43. SFVALUE m_BurstIcons_Single;
  44. SFVALUE m_WeaponPenetration1;
  45. SFVALUE m_WeaponPenetration2;
  46. SFVALUE m_WeaponPenetration3;
  47. SFVALUE m_UpgradeKill1;
  48. SFVALUE m_UpgradeKill2;
  49. SFVALUE m_UpgradeKillText;
  50. SFVALUE m_BombHandle;
  51. SFVALUE m_DefuseHandle;
  52. SFVALUE m_BombZoneHandle;
  53. SFVALUE m_WeaponItemName;
  54. int m_PrevAmmoClipCount;
  55. int m_PrevAmmoTotalCount;
  56. int m_PrevAmmoType;
  57. int m_PrevWeaponID;
  58. int m_PrevTRGunGameUpgradePoints;
  59. bool m_bHiddenNoAmmo; // we hid the panel because our current weapon has no ammo at all
  60. bool m_bCarryingC4; // player is carrying the bomb
  61. bool m_bCarryingDefuse; // player is carrying a defuse kit
  62. bool m_bInBombZone ; // player is in the bomb zone
  63. int m_lastEntityIndex;
  64. int m_LastNumRoundKills;
  65. int m_lastKillEaterCount;
  66. };
  67. #endif /* SFHUDWEAPONPANEL_H_ */