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.

70 lines
1.4 KiB

  1. //========= Copyright Valve Corporation, All rights reserved. ============//
  2. //
  3. // Purpose:
  4. //
  5. // $NoKeywords: $
  6. //=============================================================================
  7. #ifndef MOTDPANEL_H
  8. #define MOTDPANEL_H
  9. #ifdef _WIN32
  10. #pragma once
  11. #endif
  12. #include <VGUI_Frame.h>
  13. #include <VGUI_PHandle.h>
  14. #include <VGUI_ListPanel.h>
  15. #include <VGUI_KeyValues.h>
  16. #include <VGUI_PropertyPage.h>
  17. #include "rcon.h"
  18. class KeyValues;
  19. namespace vgui
  20. {
  21. class Button;
  22. class ToggleButton;
  23. class RadioButton;
  24. class Label;
  25. class TextEntry;
  26. class ListPanel;
  27. class MessageBox;
  28. class ComboBox;
  29. class Panel;
  30. class PropertySheet;
  31. };
  32. //-----------------------------------------------------------------------------
  33. // Purpose: Dialog for displaying information about a game server
  34. //-----------------------------------------------------------------------------
  35. class CMOTDPanel:public vgui::PropertyPage
  36. {
  37. public:
  38. CMOTDPanel(vgui::Panel *parent, const char *name);
  39. ~CMOTDPanel();
  40. // property page handlers
  41. virtual void OnPageShow();
  42. virtual void OnPageHide();
  43. void DoInsertString(const char *str);
  44. void SetRcon(CRcon *rcon);
  45. virtual void PerformLayout();
  46. private:
  47. void OnSendMOTD();
  48. void OnTextChanged(vgui::Panel *panel, const char *text);
  49. vgui::TextEntry *m_pMOTDPanel;
  50. vgui::Button *m_pSendMOTDButton;
  51. CRcon *m_pRcon;
  52. DECLARE_PANELMAP();
  53. typedef vgui::PropertyPage BaseClass;
  54. };
  55. #endif // MOTDPANEL_H