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.

73 lines
2.0 KiB

  1. //========= Copyright Valve Corporation, All rights reserved. ============//
  2. //
  3. // Purpose:
  4. //
  5. // $NoKeywords: $
  6. //=============================================================================//
  7. #ifndef TF_ROUNDINFO_H
  8. #define TF_ROUNDINFO_H
  9. #ifdef _WIN32
  10. #pragma once
  11. #endif
  12. //-----------------------------------------------------------------------------
  13. // Purpose: displays the RoundInfo menu
  14. //-----------------------------------------------------------------------------
  15. class RoundInfoOverlay;
  16. class CTFRoundInfo : public vgui::Frame, public IViewPortPanel, public CGameEventListener
  17. {
  18. private:
  19. DECLARE_CLASS_SIMPLE( CTFRoundInfo, vgui::Frame );
  20. public:
  21. CTFRoundInfo( IViewPort *pViewPort );
  22. virtual const char *GetName( void ){ return PANEL_ROUNDINFO; }
  23. virtual void SetData( KeyValues *data );
  24. virtual void Reset(){ Update(); }
  25. virtual void Update();
  26. virtual bool NeedsUpdate( void ){ return false; }
  27. virtual bool HasInputElements( void ){ return true; }
  28. virtual void ShowPanel( bool bShow );
  29. // both vgui::Frame and IViewPortPanel define these, so explicitly define them here as passthroughs to vgui
  30. vgui::VPANEL GetVPanel( void ){ return BaseClass::GetVPanel(); }
  31. virtual bool IsVisible(){ return BaseClass::IsVisible(); }
  32. virtual void SetParent( vgui::VPANEL parent ){ BaseClass::SetParent( parent ); }
  33. virtual void FireGameEvent( IGameEvent *event );
  34. virtual GameActionSet_t GetPreferredActionSet() { return GAME_ACTION_SET_IN_GAME_HUD; }
  35. protected:
  36. virtual void OnKeyCodePressed( vgui::KeyCode code );
  37. virtual void PerformLayout();
  38. virtual void ApplySchemeSettings( vgui::IScheme *pScheme );
  39. virtual void OnCommand( const char *command );
  40. void UpdateImage( vgui::ImagePanel *pImagePanel, const char *pszImageName );
  41. protected:
  42. IViewPort *m_pViewPort;
  43. CExLabel *m_pTitle;
  44. vgui::ImagePanel *m_pMapImage;
  45. #ifdef _X360
  46. CTFFooter *m_pFooter;
  47. #else
  48. CExButton *m_pContinue;
  49. #endif
  50. char m_szMapImage[MAX_ROUND_IMAGE_NAME];
  51. RoundInfoOverlay *m_pOverlay;
  52. int m_iFoundPoints;
  53. int m_iNextRoundPoints[2];
  54. };
  55. #endif // TF_ROUNDINFO_H