Counter Strike : Global Offensive Source Code
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.

72 lines
1.9 KiB

  1. //========= Copyright � 1996-2005, Valve Corporation, All rights reserved. ============//
  2. //
  3. // Purpose:
  4. //
  5. // $NoKeywords: $
  6. //=============================================================================//
  7. #ifndef BONUSMAPSDIALOG_H
  8. #define BONUSMAPSDIALOG_H
  9. #ifdef _WIN32
  10. #pragma once
  11. #endif
  12. #include "vgui_controls/Frame.h"
  13. #include "bonusmapsdatabase.h"
  14. //-----------------------------------------------------------------------------
  15. // Purpose: Displays and loads available bonus maps
  16. //-----------------------------------------------------------------------------
  17. class CBonusMapsDialog : public vgui::Frame
  18. {
  19. DECLARE_CLASS_SIMPLE( CBonusMapsDialog, vgui::Frame );
  20. public:
  21. explicit CBonusMapsDialog(vgui::Panel *parent);
  22. ~CBonusMapsDialog();
  23. void SetSelectedBooleanStatus( const char *pchName, bool bValue );
  24. void RefreshData( void );
  25. int GetSelectedChallenge( void );
  26. virtual void ApplySchemeSettings( vgui::IScheme *pScheme );
  27. virtual void OnCommand( const char *command );
  28. private:
  29. bool ImportZippedBonusMaps( const char *pchZippedFileName );
  30. void BuildMapsList( void );
  31. void CreateBonusMapsList();
  32. int GetSelectedItemBonusMapIndex();
  33. void RefreshDialog( BonusMapDescription_t *pMap );
  34. void RefreshMedalDisplay( BonusMapDescription_t *pMap );
  35. void RefreshCompletionPercentage( void );
  36. MESSAGE_FUNC( OnPanelSelected, "PanelSelected" );
  37. MESSAGE_FUNC( OnControlModified, "ControlModified" );
  38. MESSAGE_FUNC( OnTextChanged, "TextChanged" )
  39. {
  40. OnControlModified();
  41. }
  42. MESSAGE_FUNC_CHARPTR( OnFileSelected, "FileSelected", fullpath );
  43. private:
  44. Color m_PercentageBarBackgroundColor, m_PercentageBarColor;
  45. vgui::FileOpenDialog *m_hImportBonusMapsDialog;
  46. vgui::PanelListPanel *m_pGameList;
  47. vgui::ComboBox *m_pChallengeSelection;
  48. vgui::ImagePanel *m_pPercentageBarBackground;
  49. vgui::ImagePanel *m_pPercentageBar;
  50. };
  51. extern CBonusMapsDialog *g_pBonusMapsDialog;
  52. #endif // BONUSMAPSDIALOG_H