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.

64 lines
1.5 KiB

  1. //========= Copyright Valve Corporation, All rights reserved. ============//
  2. //
  3. // Purpose: Create and display a win panel at the end of a round displaying interesting stats and info about the round.
  4. //
  5. // $NoKeywords: $
  6. //=============================================================================//
  7. #ifndef CSWINPANEL_ROUND_H
  8. #define CSWINPANEL_ROUND_H
  9. #ifdef _WIN32
  10. #pragma once
  11. #endif
  12. #include "VGUI/bordered_panel.h"
  13. #include <game/client/iviewport.h>
  14. #include <vgui/IScheme.h>
  15. #include "hud.h"
  16. #include "hudelement.h"
  17. #include "c_cs_player.h"
  18. #include "vgui_avatarimage.h"
  19. #include "cs_shareddefs.h"
  20. using namespace vgui;
  21. class WinPanel_Round : public BorderedPanel, public CHudElement
  22. {
  23. private:
  24. DECLARE_CLASS_SIMPLE( WinPanel_Round, BorderedPanel );
  25. public:
  26. WinPanel_Round(const char *pElementName);
  27. ~WinPanel_Round();
  28. virtual void Reset();
  29. virtual void Init();
  30. virtual void VidInit();
  31. virtual void ApplySchemeSettings( vgui::IScheme *pScheme );
  32. virtual void FireGameEvent( IGameEvent * event );
  33. virtual bool ShouldDraw( void );
  34. virtual void Paint( void ) {};
  35. virtual void OnScreenSizeChanged(int nOldWide, int nOldTall);
  36. virtual void OnThink();
  37. void InitLayout();
  38. void Show();
  39. void Hide();
  40. protected:
  41. void SetMVP( C_CSPlayer* pPlayer, CSMvpReason_t reason );
  42. void SetFunFactLabel( const wchar *szFunFact );
  43. private:
  44. bool m_bShowTimerDefend;
  45. bool m_bShowTimerAttack;
  46. bool m_bShouldBeVisible;
  47. // fade tracking
  48. bool m_bIsFading;
  49. float m_fFadeBeginTime;
  50. };
  51. #endif //CSWINPANEL_ROUND_H