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.

69 lines
1.7 KiB

  1. //========= Copyright Valve Corporation, All rights reserved. ============//
  2. //
  3. // Purpose:
  4. //
  5. //=============================================================================
  6. #ifndef CS_HUD_FREEZEPANEL_H
  7. #define CS_HUD_FREEZEPANEL_H
  8. #ifdef _WIN32
  9. #pragma once
  10. #endif
  11. #include <KeyValues.h>
  12. #include <vgui/IScheme.h>
  13. #include <vgui/ISurface.h>
  14. #include <vgui/ISystem.h>
  15. #include <vgui_controls/AnimationController.h>
  16. #include <vgui_controls/EditablePanel.h>
  17. #include "vgui/ILocalize.h"
  18. #include "vgui_avatarimage.h"
  19. #include "hud.h"
  20. #include "hudelement.h"
  21. #include "cs_hud_playerhealth.h"
  22. #include "cs_shareddefs.h"
  23. using namespace vgui;
  24. class HorizontalGauge;
  25. class BorderedPanel;
  26. //-----------------------------------------------------------------------------
  27. // Purpose:
  28. //-----------------------------------------------------------------------------
  29. class CCSFreezePanel : public EditablePanel, public CHudElement
  30. {
  31. private:
  32. DECLARE_CLASS_SIMPLE( CCSFreezePanel, EditablePanel );
  33. public:
  34. CCSFreezePanel( const char *pElementName );
  35. virtual void Reset();
  36. virtual void Init();
  37. virtual void ApplySchemeSettings( vgui::IScheme *pScheme );
  38. virtual void FireGameEvent( IGameEvent * event );
  39. virtual bool ShouldDraw();
  40. virtual void OnScreenSizeChanged(int nOldWide, int nOldTall);
  41. virtual void SetActive( bool bActive );
  42. void InitLayout();
  43. void Show();
  44. void Hide();
  45. int HudElementKeyInput( int down, ButtonCode_t keynum, const char *pszCurrentBinding );
  46. protected:
  47. private:
  48. BorderedPanel* m_pBackgroundPanel;
  49. HorizontalGauge* m_pKillerHealth;
  50. CAvatarImagePanel* m_pAvatar;
  51. ImagePanel* m_pDominationIcon;
  52. bool m_bShouldBeVisible;
  53. };
  54. #endif //CS_HUD_FREEZEPANEL_H