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.

66 lines
1.5 KiB

  1. //========= Copyright Valve Corporation, All rights reserved. ============//
  2. //
  3. // Purpose:
  4. //
  5. // $NoKeywords: $
  6. //=============================================================================//
  7. #ifndef TFWINPANEL_H
  8. #define TFWINPANEL_H
  9. #ifdef _WIN32
  10. #pragma once
  11. #endif
  12. #include <vgui_controls/EditablePanel.h>
  13. #include <game/client/iviewport.h>
  14. #include <vgui/IScheme.h>
  15. #include "hud.h"
  16. #include "hudelement.h"
  17. #include "econ_controls.h"
  18. #include "vgui_avatarimage.h"
  19. using namespace vgui;
  20. #define NUM_NOTABLE_PLAYERS 3
  21. #define NUM_CATEGORIES 2
  22. #define NUM_ITEMS_PER_CATEGORY 3
  23. class CTFWinPanel : public EditablePanel, public CHudElement
  24. {
  25. private:
  26. DECLARE_CLASS_SIMPLE( CTFWinPanel, EditablePanel );
  27. public:
  28. CTFWinPanel( const char *pElementName );
  29. virtual void Reset();
  30. virtual void Init();
  31. virtual void ApplySchemeSettings( vgui::IScheme *pScheme );
  32. virtual void ApplySettings( KeyValues *inResourceData );
  33. virtual void FireGameEvent( IGameEvent * event );
  34. virtual void OnThink();
  35. virtual bool ShouldDraw( void );
  36. virtual void SetVisible( bool state );
  37. virtual int GetRenderGroupPriority() { return 70; }
  38. private:
  39. void UpdateTeamInfo();
  40. private:
  41. EditablePanel *m_pTeamScorePanel;
  42. CExLabel *m_pRedTeamName;
  43. CExLabel *m_pBlueTeamName;
  44. CAvatarImagePanel *m_pRedLeaderAvatarImage;
  45. CAvatarImagePanel *m_pBlueLeaderAvatarImage;
  46. EditablePanel *m_pRedLeaderAvatarBG;
  47. EditablePanel *m_pBlueLeaderAvatarBG;
  48. float m_flTimeUpdateTeamScore;
  49. int m_iBlueTeamScore;
  50. int m_iRedTeamScore;
  51. bool m_bShouldBeVisible;
  52. };
  53. #endif //TFWINPANEL_H