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.1 KiB

  1. //========= Copyright Valve Corporation, All rights reserved. ============//
  2. //
  3. // Purpose:
  4. //
  5. //=============================================================================
  6. #ifndef TF_HUD_TEAMSWITCH_H
  7. #define TF_HUD_TEAMSWITCH_H
  8. #ifdef _WIN32
  9. #pragma once
  10. #endif
  11. #include "hudelement.h"
  12. #include <vgui_controls/EditablePanel.h>
  13. using namespace vgui;
  14. using namespace vgui;
  15. //-----------------------------------------------------------------------------
  16. // Purpose:
  17. //-----------------------------------------------------------------------------
  18. class CHudTeamSwitch : public CHudElement, public EditablePanel
  19. {
  20. DECLARE_CLASS_SIMPLE( CHudTeamSwitch, EditablePanel );
  21. public:
  22. CHudTeamSwitch( const char *pElementName );
  23. virtual void Init( void );
  24. virtual void OnTick( void );
  25. virtual void LevelInit( void );
  26. virtual void ApplySchemeSettings( IScheme *scheme );
  27. virtual bool ShouldDraw( void );
  28. virtual void FireGameEvent( IGameEvent * event );
  29. void SetupSwitchPanel( int iNewTeam );
  30. private:
  31. Label *m_pBalanceLabel;
  32. float m_flHideAt;
  33. };
  34. #endif // TF_HUD_TEAMSWITCH_H