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.

80 lines
2.2 KiB

  1. //========= Copyright Valve Corporation, All rights reserved. ============//
  2. //
  3. // Purpose:
  4. //
  5. // $NoKeywords: $
  6. //=============================================================================//
  7. #ifndef TF_ARENA_WINPANEL_H
  8. #define TF_ARENA_WINPANEL_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 "tf_gamerules.h"
  18. using namespace vgui;
  19. #define NUM_NOTABLE_PLAYERS 3
  20. #define NUM_CATEGORIES 2
  21. #define NUM_ITEMS_PER_CATEGORY 3
  22. class CTFArenaWinPanel : public EditablePanel, public CGameEventListener, public IViewPortPanel
  23. {
  24. private:
  25. DECLARE_CLASS_SIMPLE( CTFArenaWinPanel, EditablePanel );
  26. public:
  27. CTFArenaWinPanel( IViewPort *pViewPort );
  28. virtual void ApplySchemeSettings( vgui::IScheme *pScheme );
  29. virtual void ApplySettings( KeyValues *inResourceData );
  30. virtual void FireGameEvent( IGameEvent * event );
  31. virtual void OnTick();
  32. virtual int GetRenderGroupPriority() { return 70; }
  33. void SetupPlayerStats( void );
  34. virtual void SetParent( vgui::VPANEL parent ) { BaseClass::SetParent( parent ); }
  35. virtual const char *GetName( void ){ return PANEL_ARENA_WIN; }
  36. virtual void SetData( KeyValues *data ){ return; }
  37. virtual void Reset();
  38. virtual void Update();
  39. virtual bool NeedsUpdate( void ) { return false; }
  40. virtual bool HasInputElements( void ) { return true; }
  41. virtual void ShowPanel( bool bShow ){ };
  42. virtual void SetVisible( bool state );
  43. vgui::VPANEL GetVPanel( void ) { return BaseClass::GetVPanel(); }
  44. virtual bool IsVisible() { return BaseClass::IsVisible(); }
  45. bool IsFlawlessVictory( void );
  46. virtual GameActionSet_t GetPreferredActionSet() { return GAME_ACTION_SET_NONE; }
  47. private:
  48. EditablePanel *m_pTeamScorePanel;
  49. EditablePanel *m_pWinnerPanel;
  50. EditablePanel *m_pLoserPanel;
  51. Panel *m_pArenaStreakPanel;
  52. Panel *m_pArenaStreakLabel;
  53. float m_flTimeUpdateTeamScore;
  54. float m_flFlipScoresTimes;
  55. int m_iBlueTeamScore;
  56. int m_iRedTeamScore;
  57. bool m_bShouldBeVisible;
  58. bool m_bWasFlawlessVictory;
  59. int m_iWinningPlayerTeam;
  60. CUtlVector<PlayerArenaRoundScore_t> m_vecPlayerScore;
  61. wchar_t m_wzTeamLose[256];
  62. };
  63. #endif //TF_ARENA_WINPANEL_H