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.

105 lines
2.7 KiB

  1. //========= Copyright Valve Corporation, All rights reserved. ============//
  2. //
  3. // Purpose:
  4. //
  5. // $NoKeywords: $
  6. //=============================================================================
  7. #ifndef GAMEPANELINFO_H
  8. #define GAMEPANELINFO_H
  9. #ifdef _WIN32
  10. #pragma once
  11. #endif
  12. //#include <string.h>
  13. #include <KeyValues.h>
  14. #include <vgui_controls/Frame.h>
  15. #include <vgui_controls/PHandle.h>
  16. #include <vgui_controls/ListPanel.h>
  17. #include <vgui_controls/AnimatingImagePanel.h>
  18. #include <vgui_controls/Image.h>
  19. #include <vgui_controls/PropertyPage.h>
  20. #undef PropertySheet
  21. #include <vgui_controls/PropertySheet.h>
  22. #include "BanContextMenu.h"
  23. #include "chatpanel.h"
  24. #include "rawlogpanel.h"
  25. #include "serverconfigpanel.h"
  26. #include "playerpanel.h"
  27. #include "banpanel.h"
  28. #include "graphpanel.h"
  29. #include "serverinfopanel.h"
  30. #define PASSWORD_LEN 64
  31. #define MOD_LEN 64
  32. #include "imanageserver.h" // IManageServer interface
  33. class CBudgetPanelContainer;
  34. //-----------------------------------------------------------------------------
  35. // Purpose: Dialog for displaying information about a game server
  36. //-----------------------------------------------------------------------------
  37. class CGamePanelInfo : public vgui::Frame, public IManageServer
  38. {
  39. DECLARE_CLASS_SIMPLE( CGamePanelInfo, vgui::Frame );
  40. public:
  41. CGamePanelInfo(vgui::Panel *parent, const char *name, const char *mod);
  42. ~CGamePanelInfo();
  43. // IManageServer interface extras
  44. void ShowPage() { Activate(); }
  45. void AddToConsole(const char *msg);
  46. void SetAsRemoteServer(bool remote);
  47. protected:
  48. // message handlers
  49. void OnStop();
  50. MESSAGE_FUNC( OnHelp, "Help" );
  51. void OnMasterRequestRestart();
  52. void OnMasterOutOfDate( const char *msg);
  53. MESSAGE_FUNC( OnRestartServer, "RestartServer" );
  54. MESSAGE_FUNC( OnUpdateTitle, "UpdateTitle" );
  55. void SetNewTitle(bool connectionFailed, const char *additional_text); // sets the windows title
  56. // vgui overrides
  57. virtual void OnTick();
  58. virtual void OnClose();
  59. virtual void PerformLayout();
  60. virtual void ActivateBuildMode();
  61. virtual void OnCommand(const char *command);
  62. private:
  63. // methods
  64. vgui::ComboBox *m_pViewCombo;
  65. vgui::AnimatingImagePanel *m_pAnimImagePanel;
  66. // GUI pabels
  67. // main property sheet
  68. vgui::PropertySheet *m_pDetailsSheet;
  69. // panels in the sheet
  70. CPlayerPanel *m_pPlayerListPanel;
  71. CBanPanel *m_pBanListPanel;
  72. CRawLogPanel *m_pServerLogPanel;
  73. CChatPanel *m_pServerChatPanel;
  74. CServerConfigPanel *m_pServerConfigPanel;
  75. CGraphPanel *m_pGraphsPanel;
  76. CServerInfoPanel *m_pServerInfoPanel;
  77. CBudgetPanelContainer *m_pBudgetPanel;
  78. // state
  79. bool m_bRemoteServer;
  80. bool m_bShuttingDown;
  81. vgui::DHANDLE<vgui::QueryBox> m_hRestartQueryBox;
  82. vgui::DHANDLE<vgui::QueryBox> m_hOutOfDateQueryBox;
  83. };
  84. #endif // GAMEPANELINFO_H