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.

52 lines
1.6 KiB

  1. //========= Copyright � 1996-2005, Valve Corporation, All rights reserved. ============//
  2. //
  3. // Purpose: This is a panel which is rendered image on top of an entity
  4. //
  5. // $Revision: $
  6. // $NoKeywords: $
  7. //=============================================================================//
  8. #ifndef VGUI_IMAGEHEALTHPANEL_H
  9. #define VGUI_IMAGEHEALTHPANEL_H
  10. #include "vgui_EntityPanel.h"
  11. #include "vgui_EntityImagePanel.h"
  12. #include "vgui_HealthBar.h"
  13. #include "vgui_BitmapPanel.h"
  14. //-----------------------------------------------------------------------------
  15. // forward declarations
  16. //-----------------------------------------------------------------------------
  17. class C_BaseEntity;
  18. class KeyValues;
  19. class BitmapImage;
  20. //-----------------------------------------------------------------------------
  21. // This is a base class for a panel which always is rendered on top of an entity
  22. //-----------------------------------------------------------------------------
  23. class CEntityImageHealthPanel : public CEntityPanel
  24. {
  25. public:
  26. DECLARE_CLASS( CEntityImageHealthPanel, CEntityPanel );
  27. // constructor
  28. CEntityImageHealthPanel( vgui::Panel *parent, const char *panelName );
  29. ~CEntityImageHealthPanel();
  30. // initialization
  31. bool Init( KeyValues* pInitData, C_BaseEntity* pEntity );
  32. // called when we're ticked...
  33. virtual void OnTick();
  34. virtual bool ShouldDraw( void );
  35. virtual void ComputeAndSetSize( void );
  36. private:
  37. CHealthBarPanel *m_CommanderHealthBar;
  38. CHealthBarPanel *m_NormalHealthBar;
  39. CHealthBarPanel *m_ResourceLevelBar;
  40. CEntityTeamImagePanel *m_pImagePanel;
  41. };
  42. #endif // VGUI_IMAGEHEALTHPANEL_H