blob: cd7cbae775f32127c33d3122b3143a76c01a772d (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
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
|