summaryrefslogtreecommitdiff
path: root/sdklauncher/SDKLauncherDialog.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 /sdklauncher/SDKLauncherDialog.h
downloadarchived-source-engine-2018-hl2-src-master.tar.xz
archived-source-engine-2018-hl2-src-master.zip
Diffstat (limited to 'sdklauncher/SDKLauncherDialog.h')
-rw-r--r--sdklauncher/SDKLauncherDialog.h71
1 files changed, 71 insertions, 0 deletions
diff --git a/sdklauncher/SDKLauncherDialog.h b/sdklauncher/SDKLauncherDialog.h
new file mode 100644
index 0000000..832196c
--- /dev/null
+++ b/sdklauncher/SDKLauncherDialog.h
@@ -0,0 +1,71 @@
+//========= Copyright Valve Corporation, All rights reserved. ============//
+//
+// Purpose:
+//
+//=============================================================================//
+
+#ifndef MEDIABROWSERDIALOG_H
+#define MEDIABROWSERDIALOG_H
+#ifdef _WIN32
+#pragma once
+#endif
+
+#include <vgui_controls/Frame.h>
+#include <vgui_controls/ImageList.h>
+#include <vgui_controls/SectionedListPanel.h>
+#include <vgui_controls/PHandle.h>
+#include <FileSystem.h>
+#include "vgui/mousecode.h"
+#include "vgui/IScheme.h"
+#include "configs.h"
+
+//-----------------------------------------------------------------------------
+// Purpose: Main dialog for media browser
+//-----------------------------------------------------------------------------
+class CSDKLauncherDialog : public vgui::Frame
+{
+ typedef vgui::Frame BaseClass;
+
+public:
+ DECLARE_CLASS_SIMPLE( CSDKLauncherDialog, vgui::Frame );
+
+ CSDKLauncherDialog(vgui::Panel *parent, const char *name);
+ virtual ~CSDKLauncherDialog();
+
+ void PopulateCurrentGameCombo( bool bSelectLast );
+ void PopulateCurrentEngineCombo( bool bSelectLast );
+ void Launch( int hActiveListItem, bool bForce );
+ void RefreshConfigs( void );
+ void SetCurrentGame( const char* pcCurrentGame );
+
+protected:
+
+ virtual void OnClose();
+ virtual void OnCommand( const char *command );
+
+private:
+
+ void ResetConfigs( void );
+ bool ParseConfigs( CUtlVector<CGameConfig*> &configs );
+ void PopulateMediaList();
+ void GetEngineVersion(char* pcEngineVer, int nSize);
+ void SetEngineVersion(const char *pcEngineVer);
+
+ MESSAGE_FUNC_INT( OnItemDoubleLeftClick, "ItemDoubleLeftClick", itemID );
+ MESSAGE_FUNC_INT( OnItemContextMenu, "ItemContextMenu", itemID );
+ MESSAGE_FUNC_PARAMS( OnTextChanged, "TextChanged", pkv );
+
+private:
+
+ vgui::ImageList *m_pImageList;
+ vgui::SectionedListPanel *m_pMediaList;
+ vgui::Menu *m_pContextMenu;
+ vgui::ComboBox *m_pCurrentGameCombo;
+ vgui::ComboBox *m_pCurrentEngineCombo;
+};
+
+
+extern CSDKLauncherDialog *g_pSDKLauncherDialog;
+
+
+#endif // MEDIABROWSERDIALOG_H