2012-12-19 09:30:18 +00:00
|
|
|
/****************************************************************************
|
|
|
|
* *
|
2015-11-10 05:21:49 +00:00
|
|
|
* Project64 - A Nintendo 64 emulator. *
|
2012-12-19 09:30:18 +00:00
|
|
|
* http://www.pj64-emu.com/ *
|
|
|
|
* Copyright (C) 2012 Project64. All rights reserved. *
|
|
|
|
* *
|
|
|
|
* License: *
|
|
|
|
* GNU/GPLv2 http://www.gnu.org/licenses/gpl-2.0.html *
|
|
|
|
* *
|
|
|
|
****************************************************************************/
|
2008-11-14 20:51:06 +00:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
class COptionsDirectoriesPage :
|
2015-12-23 19:29:57 +00:00
|
|
|
public CDialogImpl<COptionsDirectoriesPage>,
|
|
|
|
public CSettingsPage
|
2008-11-14 20:51:06 +00:00
|
|
|
{
|
2015-12-23 19:29:57 +00:00
|
|
|
BEGIN_MSG_MAP_EX(COptionsDirectoriesPage)
|
|
|
|
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)
|
2008-11-14 20:51:06 +00:00
|
|
|
|
2015-12-23 19:29:57 +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)
|
|
|
|
END_MSG_MAP()
|
2008-11-14 20:51:06 +00:00
|
|
|
|
2015-12-23 19:29:57 +00:00
|
|
|
enum { IDD = IDD_Settings_Directory };
|
2008-11-14 20:51:06 +00:00
|
|
|
|
|
|
|
public:
|
2015-12-23 19:29:57 +00:00
|
|
|
COptionsDirectoriesPage(HWND hParent, const RECT & rcDispay);
|
2008-11-14 20:51:06 +00:00
|
|
|
|
2015-12-23 19:29:57 +00:00
|
|
|
LanguageStringID PageTitle(void) { return TAB_DIRECTORY; }
|
|
|
|
void HidePage(void);
|
|
|
|
void ShowPage(void);
|
|
|
|
void ApplySettings(bool UpdateScreen);
|
|
|
|
bool EnableReset(void);
|
|
|
|
void ResetPage(void);
|
2008-11-14 20:51:06 +00:00
|
|
|
|
|
|
|
private:
|
2015-12-23 19:29:57 +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);
|
|
|
|
|
|
|
|
void UpdateDirectory(CModifiedEditBox & EditBox, SettingID Type);
|
|
|
|
void UpdateDefaultSelected(CModifiedButton & Button, SettingID Type);
|
|
|
|
|
|
|
|
void ResetDirectory(CModifiedEditBox & EditBox, SettingID Type);
|
|
|
|
void ResetDefaultSelected(CModifiedButton & ButtonDefault, CModifiedButton & ButtonSelected, SettingID Type);
|
2008-11-14 20:51:06 +00:00
|
|
|
|
2015-12-23 19:29:57 +00:00
|
|
|
static int CALLBACK SelectDirCallBack(HWND hwnd, DWORD uMsg, DWORD lp, DWORD lpData);
|
2008-11-14 20:51:06 +00:00
|
|
|
|
2015-12-23 19:29:57 +00:00
|
|
|
CPartialGroupBox m_PluginGroup, m_AutoSaveGroup, m_InstantSaveGroup,
|
|
|
|
m_ScreenShotGroup, m_TextureGroup;
|
|
|
|
CModifiedEditBox m_PluginDir, m_AutoSaveDir, m_InstantSaveDir,
|
|
|
|
m_ScreenShotDir, m_TextureDir;
|
2008-11-14 20:51:06 +00:00
|
|
|
|
2015-12-23 19:29:57 +00:00
|
|
|
CModifiedButton m_PluginDefault, m_PluginSelected, m_AutoSaveDefault, m_AutoSaveSelected,
|
|
|
|
m_InstantDefault, m_InstantSelected, m_ScreenShotDefault, m_ScreenShotSelected,
|
|
|
|
m_TextureDefault, m_TextureSelected;
|
2008-11-14 20:51:06 +00:00
|
|
|
|
2015-12-23 19:29:57 +00:00
|
|
|
bool m_InUpdateSettings;
|
2008-11-14 20:51:06 +00:00
|
|
|
};
|