summaryrefslogtreecommitdiff
path: root/hammer/optconfigs.h
blob: 4115d0e8101f1a0d7d8160f5a604565af7e9f4bc (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
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
//========= Copyright Valve Corporation, All rights reserved. ============//
//
// Purpose: 
//
//=============================================================================//

#ifndef OPTCONFIGS_H
#define OPTCONFIGS_H
#pragma once


#include "AutoSelCombo.h"


class COPTConfigs : public CPropertyPage
{
	DECLARE_DYNCREATE(COPTConfigs)

public:

	COPTConfigs();
	~COPTConfigs();

	inline CGameConfig *GetCurrentConfig( void );

	// Dialog Data
	//{{AFX_DATA(COPTConfigs)
	enum { IDD = IDD_OPTIONS_CONFIGS };
	CEdit	m_cMapDir;
	CEdit	m_cGameExeDir;
	CEdit	m_cModDir;
	CEdit	m_cCordonTexture;
	CEdit	m_cDefaultTextureScale;
	CComboBox	m_cMapFormat;
	CComboBox	m_cTextureFormat;
	CAutoSelComboBox m_cDefaultPoint;
	CAutoSelComboBox m_cDefaultSolid;
	CListBox	m_cGDFiles;
	CComboBox	m_cConfigs;
	//}}AFX_DATA


	// ClassWizard generate virtual function overrides
	//{{AFX_VIRTUAL(COPTConfigs)
	public:
	virtual BOOL OnApply();
	protected:
	virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support
	//}}AFX_VIRTUAL

protected:

	// Generated message map functions
	//{{AFX_MSG(COPTConfigs)
	afx_msg void OnEditconfigs();
	afx_msg void OnGdfileAdd();
	afx_msg void OnGdfileEdit();
	afx_msg void OnGdfileRemove();
	virtual BOOL OnInitDialog();
	afx_msg void OnBrowseexe();
	afx_msg void OnSelchangeConfigurations();
	afx_msg void OnConfigureExes();
	afx_msg void OnBrowsemapdir();
	afx_msg void OnBrowseGameExeDir(void);
	afx_msg void OnBrowseModDir(void);
	afx_msg void OnBrowseCordonTexture(void);
	afx_msg LRESULT OnSettingChange(WPARAM wParam, LPARAM lParam);
	//}}AFX_MSG

	DECLARE_MESSAGE_MAP()

	BOOL BrowseForFolder(char *pszTitle, char *pszDirectory);
	void SaveInfo(CGameConfig*);
	void UpdateConfigList();
	void UpdateEntityLists();
	bool ConfigChanged(CGameConfig *pConfig);

	CGameConfig *m_pLastSelConfig;
	CGameConfig *m_pInitialSelectedConfig;
	CString m_strInitialGameDir;
};


//-----------------------------------------------------------------------------
// Purpose: get the last selected game configuration for this page
//  Output: return pointer to last selected game configuration
//-----------------------------------------------------------------------------
inline CGameConfig *COPTConfigs::GetCurrentConfig( void )
{
	return m_pLastSelConfig;
}


#endif // OPTCONFIGS_H