summaryrefslogtreecommitdiff
path: root/dedicated/vgui/MainPanel.h
diff options
context:
space:
mode:
authorFluorescentCIAAfricanAmerican <[email protected]>2020-04-22 12:56:21 -0400
committerFluorescentCIAAfricanAmerican <[email protected]>2020-04-22 12:56:21 -0400
commit3bf9df6b2785fa6d951086978a3e66f49427166a (patch)
tree2c0f1f0c63c4832882bc93814ebd2c2b1c6224e5 /dedicated/vgui/MainPanel.h
downloadarchived-source-engine-2018-hl2-src-master.tar.xz
archived-source-engine-2018-hl2-src-master.zip
Diffstat (limited to 'dedicated/vgui/MainPanel.h')
-rw-r--r--dedicated/vgui/MainPanel.h89
1 files changed, 89 insertions, 0 deletions
diff --git a/dedicated/vgui/MainPanel.h b/dedicated/vgui/MainPanel.h
new file mode 100644
index 0000000..04f558e
--- /dev/null
+++ b/dedicated/vgui/MainPanel.h
@@ -0,0 +1,89 @@
+//========= Copyright Valve Corporation, All rights reserved. ============//
+//
+// Purpose:
+//
+// $Workfile: $
+// $Date: $
+// $NoKeywords: $
+//===========================================================================//
+#ifndef CMAINPANEL_H
+#define CMAINPANEL_H
+#ifdef _WIN32
+#pragma once
+#endif
+
+#include <vgui_controls/Frame.h>
+#include <vgui_controls/Panel.h>
+#include <vgui_controls/ListPanel.h>
+#include <vgui_controls/PHandle.h>
+#include "utlvector.h"
+
+//#include <GamePanelInfo.h>
+
+#include "imanageserver.h"
+//#include "gameserver.h"
+#include "CreateMultiplayerGameServerPage.h"
+
+class IAdminServer;
+
+//-----------------------------------------------------------------------------
+// Purpose: Root panel for dedicated server GUI
+//-----------------------------------------------------------------------------
+class CMainPanel : public vgui::Panel
+{
+public:
+ // Construction/destruction
+ CMainPanel( );
+ virtual ~CMainPanel();
+
+ virtual void Initialize( );
+
+ // displays the dialog, moves it into focus, updates if it has to
+ virtual void Open( void );
+
+ // returns a pointer to a static instance of this dialog
+ // valid for use only in sort functions
+ static CMainPanel *GetInstance();
+ virtual void StartServer(const char *cvars);
+
+ void ActivateBuildMode();
+
+ void *GetShutdownHandle() { return m_hShutdown; }
+
+ void AddConsoleText(const char *msg);
+
+ bool Stopping() { return m_bClosing; }
+
+ bool IsInConfig() { return m_bIsInConfig; }
+
+private:
+
+ // called when dialog is shut down
+ virtual void OnClose();
+ virtual void OnTick();
+ void DoStop();
+
+ // GUI elements
+ IManageServer *m_pGameServer;
+
+ // the popup menu
+ vgui::DHANDLE<vgui::ProgressBox> m_pProgressBox;
+ CCreateMultiplayerGameServerPage *m_pConfigPage;
+
+ // Event that lets the thread tell the main window it shutdown
+ void *m_hShutdown;
+
+ bool m_bStarting; // whether the server is currently starting
+ bool m_bStarted; // whether the server has been started or not
+ bool m_bClosing; // whether we are shutting down
+ bool m_bIsInConfig;
+ serveritem_t s1;
+ int m_hResourceWaitHandle;
+ float m_flPreviousSteamProgress;
+
+ typedef vgui::Panel BaseClass;
+ DECLARE_PANELMAP();
+
+};
+
+#endif // CMAINPANEL_H \ No newline at end of file