Team Fortress 2 Source Code as on 22/4/2020
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.

94 lines
2.3 KiB

  1. //========= Copyright Valve Corporation, All rights reserved. ============//
  2. //
  3. // Purpose:
  4. //
  5. //=============================================================================//
  6. #ifndef OPTCONFIGS_H
  7. #define OPTCONFIGS_H
  8. #pragma once
  9. #include "AutoSelCombo.h"
  10. class COPTConfigs : public CPropertyPage
  11. {
  12. DECLARE_DYNCREATE(COPTConfigs)
  13. public:
  14. COPTConfigs();
  15. ~COPTConfigs();
  16. inline CGameConfig *GetCurrentConfig( void );
  17. // Dialog Data
  18. //{{AFX_DATA(COPTConfigs)
  19. enum { IDD = IDD_OPTIONS_CONFIGS };
  20. CEdit m_cMapDir;
  21. CEdit m_cGameExeDir;
  22. CEdit m_cModDir;
  23. CEdit m_cCordonTexture;
  24. CEdit m_cDefaultTextureScale;
  25. CComboBox m_cMapFormat;
  26. CComboBox m_cTextureFormat;
  27. CAutoSelComboBox m_cDefaultPoint;
  28. CAutoSelComboBox m_cDefaultSolid;
  29. CListBox m_cGDFiles;
  30. CComboBox m_cConfigs;
  31. //}}AFX_DATA
  32. // ClassWizard generate virtual function overrides
  33. //{{AFX_VIRTUAL(COPTConfigs)
  34. public:
  35. virtual BOOL OnApply();
  36. protected:
  37. virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
  38. //}}AFX_VIRTUAL
  39. protected:
  40. // Generated message map functions
  41. //{{AFX_MSG(COPTConfigs)
  42. afx_msg void OnEditconfigs();
  43. afx_msg void OnGdfileAdd();
  44. afx_msg void OnGdfileEdit();
  45. afx_msg void OnGdfileRemove();
  46. virtual BOOL OnInitDialog();
  47. afx_msg void OnBrowseexe();
  48. afx_msg void OnSelchangeConfigurations();
  49. afx_msg void OnConfigureExes();
  50. afx_msg void OnBrowsemapdir();
  51. afx_msg void OnBrowseGameExeDir(void);
  52. afx_msg void OnBrowseModDir(void);
  53. afx_msg void OnBrowseCordonTexture(void);
  54. afx_msg LRESULT OnSettingChange(WPARAM wParam, LPARAM lParam);
  55. //}}AFX_MSG
  56. DECLARE_MESSAGE_MAP()
  57. BOOL BrowseForFolder(char *pszTitle, char *pszDirectory);
  58. void SaveInfo(CGameConfig*);
  59. void UpdateConfigList();
  60. void UpdateEntityLists();
  61. bool ConfigChanged(CGameConfig *pConfig);
  62. CGameConfig *m_pLastSelConfig;
  63. CGameConfig *m_pInitialSelectedConfig;
  64. CString m_strInitialGameDir;
  65. };
  66. //-----------------------------------------------------------------------------
  67. // Purpose: get the last selected game configuration for this page
  68. // Output: return pointer to last selected game configuration
  69. //-----------------------------------------------------------------------------
  70. inline CGameConfig *COPTConfigs::GetCurrentConfig( void )
  71. {
  72. return m_pLastSelConfig;
  73. }
  74. #endif // OPTCONFIGS_H