summaryrefslogtreecommitdiff
path: root/gameui/CreateMultiplayerGameServerPage.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 /gameui/CreateMultiplayerGameServerPage.h
downloadarchived-source-engine-2018-hl2-src-3bf9df6b2785fa6d951086978a3e66f49427166a.tar.xz
archived-source-engine-2018-hl2-src-3bf9df6b2785fa6d951086978a3e66f49427166a.zip
Diffstat (limited to 'gameui/CreateMultiplayerGameServerPage.h')
-rw-r--r--gameui/CreateMultiplayerGameServerPage.h60
1 files changed, 60 insertions, 0 deletions
diff --git a/gameui/CreateMultiplayerGameServerPage.h b/gameui/CreateMultiplayerGameServerPage.h
new file mode 100644
index 0000000..227177b
--- /dev/null
+++ b/gameui/CreateMultiplayerGameServerPage.h
@@ -0,0 +1,60 @@
+//========= Copyright Valve Corporation, All rights reserved. ============//
+//
+// Purpose:
+//
+// $NoKeywords: $
+//=============================================================================//
+
+#ifndef CREATEMULTIPLAYERGAMESERVERPAGE_H
+#define CREATEMULTIPLAYERGAMESERVERPAGE_H
+#ifdef _WIN32
+#pragma once
+#endif
+
+#include <vgui_controls/PropertyPage.h>
+#include "CvarToggleCheckButton.h"
+
+//-----------------------------------------------------------------------------
+// Purpose: server options page of the create game server dialog
+//-----------------------------------------------------------------------------
+class CCreateMultiplayerGameServerPage : public vgui::PropertyPage
+{
+ DECLARE_CLASS_SIMPLE( CCreateMultiplayerGameServerPage, vgui::PropertyPage );
+
+public:
+ CCreateMultiplayerGameServerPage(vgui::Panel *parent, const char *name);
+ ~CCreateMultiplayerGameServerPage();
+
+ virtual void OnKeyCodePressed( vgui::KeyCode code );
+
+ // returns currently entered information about the server
+ void SetMap(const char *name);
+ bool IsRandomMapSelected();
+ const char *GetMapName();
+
+ vgui::ComboBox *GetMapList( void ) { return m_pMapList; }
+
+ // CS Bots
+ void EnableBots( KeyValues *data );
+ int GetBotQuota( void );
+ bool GetBotsEnabled( void );
+
+protected:
+ virtual void OnApplyChanges();
+ MESSAGE_FUNC( OnCheckButtonChecked, "CheckButtonChecked" );
+
+private:
+ void LoadMapList();
+ void LoadMaps( const char *pszPathID );
+
+ vgui::ComboBox *m_pMapList;
+ vgui::CheckButton *m_pEnableBotsCheck;
+ CCvarToggleCheckButton *m_pEnableTutorCheck;
+ KeyValues *m_pSavedData;
+
+ enum { DATA_STR_LENGTH = 64 };
+ char m_szMapName[DATA_STR_LENGTH];
+};
+
+
+#endif // CREATEMULTIPLAYERGAMESERVERPAGE_H