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.

62 lines
1.6 KiB

  1. //========= Copyright Valve Corporation, All rights reserved. ============//
  2. //
  3. // Purpose:
  4. //
  5. // $NoKeywords: $
  6. //=============================================================================//
  7. #ifndef TFTEXTWINDOW_H
  8. #define TFTEXTWINDOW_H
  9. #ifdef _WIN32
  10. #pragma once
  11. #endif
  12. #include <vgui_controls/Panel.h>
  13. #include "vguitextwindow.h"
  14. #include "tf_controls.h"
  15. #include "IconPanel.h"
  16. using namespace vgui;
  17. //-----------------------------------------------------------------------------
  18. // Purpose: displays the MOTD
  19. //-----------------------------------------------------------------------------
  20. class CTFTextWindow : public CTextWindow
  21. {
  22. private:
  23. DECLARE_CLASS_SIMPLE( CTFTextWindow, CTextWindow );
  24. public:
  25. CTFTextWindow( IViewPort *pViewPort );
  26. virtual ~CTFTextWindow();
  27. virtual void SetData(KeyValues *data);
  28. virtual void Update();
  29. virtual void Reset();
  30. virtual void SetVisible(bool state);
  31. virtual void ShowPanel( bool bShow );
  32. virtual void OnKeyCodePressed( vgui::KeyCode code );
  33. virtual void ApplySchemeSettings( vgui::IScheme *pScheme );
  34. virtual void ShowFile( const char *filename );
  35. virtual void ShowURL( const char *URL, bool bAllowUserToDisable = true );
  36. virtual void ShowText( const char *text );
  37. void ShowTitleLabel( bool show );
  38. virtual void OnThink();
  39. virtual GameActionSet_t GetPreferredActionSet() { return GAME_ACTION_SET_IN_GAME_HUD; }
  40. public:
  41. virtual void PaintBackground();
  42. protected:
  43. // vgui overrides
  44. virtual void OnCommand( const char *command );
  45. private:
  46. CExRichText *m_pTFTextMessage;
  47. bool m_bCustomSvrPage;
  48. };
  49. #endif // TFTEXTWINDOW_H