summaryrefslogtreecommitdiff
path: root/gameui/BonusMapsDialog.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/BonusMapsDialog.h
downloadarchived-source-engine-2018-hl2-src-master.tar.xz
archived-source-engine-2018-hl2-src-master.zip
Diffstat (limited to 'gameui/BonusMapsDialog.h')
-rw-r--r--gameui/BonusMapsDialog.h75
1 files changed, 75 insertions, 0 deletions
diff --git a/gameui/BonusMapsDialog.h b/gameui/BonusMapsDialog.h
new file mode 100644
index 0000000..cd7cbae
--- /dev/null
+++ b/gameui/BonusMapsDialog.h
@@ -0,0 +1,75 @@
+//========= Copyright Valve Corporation, All rights reserved. ============//
+//
+// Purpose:
+//
+// $NoKeywords: $
+//=============================================================================//
+
+#ifndef BONUSMAPSDIALOG_H
+#define BONUSMAPSDIALOG_H
+#ifdef _WIN32
+#pragma once
+#endif
+
+#include "vgui_controls/Frame.h"
+
+#include "BonusMapsDatabase.h"
+
+
+//-----------------------------------------------------------------------------
+// Purpose: Displays and loads available bonus maps
+//-----------------------------------------------------------------------------
+class CBonusMapsDialog : public vgui::Frame
+{
+ DECLARE_CLASS_SIMPLE( CBonusMapsDialog, vgui::Frame );
+
+public:
+ CBonusMapsDialog(vgui::Panel *parent);
+ ~CBonusMapsDialog();
+
+ void SetSelectedBooleanStatus( const char *pchName, bool bValue );
+ void RefreshData( void );
+
+ int GetSelectedChallenge( void );
+
+ virtual void ApplySchemeSettings( vgui::IScheme *pScheme );
+ virtual void OnCommand( const char *command );
+
+ void OnKeyCodeTyped( vgui::KeyCode code );
+ void OnKeyCodePressed( vgui::KeyCode code );
+
+private:
+ bool ImportZippedBonusMaps( const char *pchZippedFileName );
+
+ void BuildMapsList( void );
+
+ void CreateBonusMapsList();
+ int GetSelectedItemBonusMapIndex();
+
+ void RefreshDialog( BonusMapDescription_t *pMap );
+ void RefreshMedalDisplay( BonusMapDescription_t *pMap );
+ void RefreshCompletionPercentage( void );
+
+ MESSAGE_FUNC( OnPanelSelected, "PanelSelected" );
+ MESSAGE_FUNC( OnControlModified, "ControlModified" );
+ MESSAGE_FUNC( OnTextChanged, "TextChanged" )
+ {
+ OnControlModified();
+ }
+ MESSAGE_FUNC_CHARPTR( OnFileSelected, "FileSelected", fullpath );
+
+private:
+ Color m_PercentageBarBackgroundColor, m_PercentageBarColor;
+
+ vgui::FileOpenDialog *m_hImportBonusMapsDialog;
+ vgui::PanelListPanel *m_pGameList;
+ vgui::ComboBox *m_pChallengeSelection;
+ vgui::ImagePanel *m_pPercentageBarBackground;
+ vgui::ImagePanel *m_pPercentageBar;
+};
+
+
+extern CBonusMapsDialog *g_pBonusMapsDialog;
+
+
+#endif // BONUSMAPSDIALOG_H