project64/Source/Project64/UserInterface/Settings/SettingsPage-Directories.h

85 lines
3.7 KiB
C
Raw Normal View History

2016-01-27 09:11:59 +00:00
#pragma once
class COptionsDirectoriesPage :
public CDialogImpl<COptionsDirectoriesPage>,
public CSettingsPage
{
BEGIN_MSG_MAP_EX(COptionsDirectoriesPage)
2022-09-26 02:31:54 +00:00
{
COMMAND_ID_HANDLER_EX(IDC_SELECT_PLUGIN_DIR, SelectPluginDir);
COMMAND_ID_HANDLER_EX(IDC_SELECT_AUTO_DIR, SelectAutoDir);
COMMAND_ID_HANDLER_EX(IDC_SELECT_INSTANT_DIR, SelectInstantDir);
COMMAND_ID_HANDLER_EX(IDC_SELECT_SNAP_DIR, SelectSnapShotDir);
COMMAND_ID_HANDLER_EX(IDC_SELECT_TEXTURE_DIR, SelectTextureDir);
COMMAND_HANDLER_EX(IDC_PLUGIN_DIR, EN_UPDATE, PluginDirChanged);
COMMAND_HANDLER_EX(IDC_AUTO_DIR, EN_UPDATE, AutoSaveDirChanged);
COMMAND_HANDLER_EX(IDC_INSTANT_DIR, EN_UPDATE, InstantSaveDirChanged);
COMMAND_HANDLER_EX(IDC_SNAP_DIR, EN_UPDATE, SnapShotDirChanged);
COMMAND_HANDLER_EX(IDC_TEXTURE_DIR, EN_UPDATE, TextureDirChanged);
2016-01-27 09:11:59 +00:00
2022-09-26 02:31:54 +00:00
COMMAND_HANDLER_EX(IDC_PLUGIN_DEFAULT, BN_CLICKED, UseSelectedClicked);
COMMAND_HANDLER_EX(IDC_PLUGIN_OTHER, BN_CLICKED, UseSelectedClicked);
COMMAND_HANDLER_EX(IDC_AUTO_DEFAULT, BN_CLICKED, UseSelectedClicked);
COMMAND_HANDLER_EX(IDC_AUTO_OTHER, BN_CLICKED, UseSelectedClicked);
COMMAND_HANDLER_EX(IDC_INSTANT_DEFAULT, BN_CLICKED, UseSelectedClicked);
COMMAND_HANDLER_EX(IDC_INSTANT_OTHER, BN_CLICKED, UseSelectedClicked);
COMMAND_HANDLER_EX(IDC_SNAP_DEFAULT, BN_CLICKED, UseSelectedClicked);
COMMAND_HANDLER_EX(IDC_SNAP_OTHER, BN_CLICKED, UseSelectedClicked);
COMMAND_HANDLER_EX(IDC_TEXTURE_DEFAULT, BN_CLICKED, UseSelectedClicked);
COMMAND_HANDLER_EX(IDC_TEXTURE_OTHER, BN_CLICKED, UseSelectedClicked);
}
2016-01-27 09:11:59 +00:00
END_MSG_MAP()
2022-09-26 02:31:54 +00:00
enum
{
IDD = IDD_Settings_Directory
};
2016-01-27 09:11:59 +00:00
public:
COptionsDirectoriesPage(HWND hParent, const RECT & rcDispay);
2022-09-26 02:31:54 +00:00
LanguageStringID PageTitle(void)
{
return TAB_DIRECTORY;
}
void HidePage(void);
void ShowPage(void);
void ApplySettings(bool UpdateScreen);
bool EnableReset(void);
void ResetPage(void);
2016-01-27 09:11:59 +00:00
private:
2022-09-26 02:31:54 +00:00
void SelectPluginDir(UINT Code, int id, HWND ctl);
void SelectAutoDir(UINT Code, int id, HWND ctl);
void SelectInstantDir(UINT Code, int id, HWND ctl);
void SelectSnapShotDir(UINT Code, int id, HWND ctl);
void SelectTextureDir(UINT Code, int id, HWND ctl);
void PluginDirChanged(UINT Code, int id, HWND ctl);
void AutoSaveDirChanged(UINT Code, int id, HWND ctl);
void InstantSaveDirChanged(UINT Code, int id, HWND ctl);
void SnapShotDirChanged(UINT Code, int id, HWND ctl);
void TextureDirChanged(UINT Code, int id, HWND ctl);
void UseSelectedClicked(UINT Code, int id, HWND ctl);
void UpdatePageSettings(void);
void SelectDirectory(LanguageStringID Title, CModifiedEditBox & EditBox, CModifiedButton & Default, CModifiedButton & selected);
2016-01-27 09:11:59 +00:00
2022-09-26 02:31:54 +00:00
void UpdateDirectory(CModifiedEditBox & EditBox, SettingID Type);
void UpdateDefaultSelected(CModifiedButton & Button, SettingID Type);
2016-01-27 09:11:59 +00:00
2022-09-26 02:31:54 +00:00
void ResetDirectory(CModifiedEditBox & EditBox, SettingID Type);
void ResetDefaultSelected(CModifiedButton & ButtonDefault, CModifiedButton & ButtonSelected, SettingID Type);
2016-01-27 09:11:59 +00:00
static int CALLBACK SelectDirCallBack(HWND hwnd, DWORD uMsg, DWORD lp, DWORD lpData);
CPartialGroupBox m_PluginGroup, m_AutoSaveGroup, m_InstantSaveGroup,
m_ScreenShotGroup, m_TextureGroup;
CModifiedEditBox m_PluginDir, m_AutoSaveDir, m_InstantSaveDir,
m_ScreenShotDir, m_TextureDir;
2022-09-26 02:31:54 +00:00
CModifiedButton m_PluginDefault, m_PluginSelected, m_AutoSaveDefault, m_AutoSaveSelected,
2016-01-27 09:11:59 +00:00
m_InstantDefault, m_InstantSelected, m_ScreenShotDefault, m_ScreenShotSelected,
m_TextureDefault, m_TextureSelected;
bool m_InUpdateSettings;
};