Team Fortress 2 Source Code as on 22/4/2020
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.

44 lines
1.3 KiB

  1. //========= Copyright Valve Corporation, All rights reserved. ============//
  2. #ifndef HUD_BOSS_HEALTH_METER_H
  3. #define HUD_BOSS_HEALTH_METER_H
  4. #include "hud.h"
  5. #include "hudelement.h"
  6. #include <vgui_controls/EditablePanel.h>
  7. #include <vgui_controls/ProgressBar.h>
  8. class CHudBossHealthMeter : public CHudElement, public vgui::EditablePanel
  9. {
  10. DECLARE_CLASS_SIMPLE( CHudBossHealthMeter, vgui::EditablePanel );
  11. public:
  12. CHudBossHealthMeter( const char *pElementName );
  13. virtual void ApplySchemeSettings( vgui::IScheme *scheme );
  14. virtual bool ShouldDraw( void );
  15. virtual void Init( void );
  16. virtual void OnTick( void );
  17. void Update( void ); // update HUD due to data changes
  18. private:
  19. vgui::ContinuousProgressBar *m_pStunMeter;
  20. vgui::EditablePanel *m_pHealthBarPanel;
  21. vgui::ImagePanel *m_pBarImagePanel;
  22. Color m_bossActiveBarColor;
  23. vgui::ImagePanel *m_pBorderImagePanel;
  24. Color m_bossActiveBorderColor;
  25. Color m_inactiveColor;
  26. CPanelAnimationVarAliasType( int, m_nHealthAlivePosY, "health_alive_pos_y", "42", "proportional_ypos" );
  27. CPanelAnimationVarAliasType( int, m_nHealthDeadPosY, "health_dead_pos_y", "90", "proportional_ypos" );
  28. CPanelAnimationVarAliasType( int, m_nHealthBarWide, "health_bar_wide", "168", "proportional_xpos" );
  29. };
  30. #endif // HUD_BOSS_HEALTH_METER_H