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 *
|
|
|
|
* *
|
|
|
|
****************************************************************************/
|
2010-06-07 02:23:58 +00:00
|
|
|
#include "stdafx.h"
|
2015-09-07 19:47:44 +00:00
|
|
|
|
2015-12-04 06:49:31 +00:00
|
|
|
#include "SettingsPage.h"
|
2008-11-14 20:51:06 +00:00
|
|
|
|
2015-11-07 01:11:25 +00:00
|
|
|
CGeneralOptionsPage::CGeneralOptionsPage(CSettingConfig * SettingsConfig, HWND hParent, const RECT & rcDispay) :
|
|
|
|
m_SettingsConfig(SettingsConfig)
|
2008-11-14 20:51:06 +00:00
|
|
|
{
|
2015-12-23 20:04:36 +00:00
|
|
|
if (!Create(hParent, rcDispay))
|
|
|
|
{
|
|
|
|
return;
|
|
|
|
}
|
2008-11-14 20:51:06 +00:00
|
|
|
|
2015-12-23 20:04:36 +00:00
|
|
|
//Set the text for all gui Items
|
|
|
|
SetDlgItemTextW(m_hWnd, IDC_AUTOSLEEP, wGS(OPTION_AUTO_SLEEP).c_str());
|
|
|
|
SetDlgItemTextW(m_hWnd, IDC_LOAD_FULLSCREEN, wGS(OPTION_AUTO_FULLSCREEN).c_str());
|
|
|
|
SetDlgItemTextW(m_hWnd, IDC_SCREEN_SAVER, wGS(OPTION_DISABLE_SS).c_str());
|
|
|
|
SetDlgItemTextW(m_hWnd, IDC_BASIC_MODE, wGS(OPTION_BASIC_MODE).c_str());
|
|
|
|
SetDlgItemTextW(m_hWnd, IDC_MAXROMS_TXT, wGS(RB_MAX_ROMS).c_str());
|
|
|
|
SetDlgItemTextW(m_hWnd, IDC_ROMSEL_TEXT2, wGS(RB_ROMS).c_str());
|
|
|
|
SetDlgItemTextW(m_hWnd, IDC_MAXROMDIR_TXT, wGS(RB_MAX_DIRS).c_str());
|
|
|
|
SetDlgItemTextW(m_hWnd, IDC_ROMSEL_TEXT4, wGS(RB_DIRS).c_str());
|
2015-03-17 02:56:53 +00:00
|
|
|
|
2015-12-23 20:04:36 +00:00
|
|
|
AddModCheckBox(GetDlgItem(IDC_AUTOSLEEP), Setting_AutoSleep);
|
|
|
|
AddModCheckBox(GetDlgItem(IDC_LOAD_FULLSCREEN), Setting_AutoFullscreen);
|
|
|
|
AddModCheckBox(GetDlgItem(IDC_SCREEN_SAVER), Setting_DisableScrSaver);
|
|
|
|
AddModCheckBox(GetDlgItem(IDC_BASIC_MODE), UserInterface_BasicMode);
|
2008-11-14 20:51:06 +00:00
|
|
|
|
2015-12-23 20:04:36 +00:00
|
|
|
CModifiedEditBox * TxtBox = AddModTextBox(GetDlgItem(IDC_REMEMBER), File_RecentGameFileCount, false);
|
|
|
|
TxtBox->SetTextField(GetDlgItem(IDC_MAXROMS_TXT));
|
2008-12-04 10:41:51 +00:00
|
|
|
|
2015-12-23 20:04:36 +00:00
|
|
|
TxtBox = AddModTextBox(GetDlgItem(IDC_REMEMBERDIR), Directory_RecentGameDirCount, false);
|
|
|
|
TxtBox->SetTextField(GetDlgItem(IDC_MAXROMDIR_TXT));
|
2008-12-04 10:41:51 +00:00
|
|
|
|
2015-12-23 20:04:36 +00:00
|
|
|
UpdatePageSettings();
|
2008-11-14 20:51:06 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
void CGeneralOptionsPage::HidePage()
|
|
|
|
{
|
2015-12-23 20:04:36 +00:00
|
|
|
ShowWindow(SW_HIDE);
|
2008-11-14 20:51:06 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
void CGeneralOptionsPage::ShowPage()
|
|
|
|
{
|
2015-12-23 20:04:36 +00:00
|
|
|
ShowWindow(SW_SHOW);
|
2008-11-14 20:51:06 +00:00
|
|
|
}
|
|
|
|
|
2015-11-07 01:11:25 +00:00
|
|
|
void CGeneralOptionsPage::ApplySettings(bool UpdateScreen)
|
2008-11-14 20:51:06 +00:00
|
|
|
{
|
2015-12-23 20:04:36 +00:00
|
|
|
CSettingsPageImpl<CGeneralOptionsPage>::ApplySettings(UpdateScreen);
|
2008-11-14 20:51:06 +00:00
|
|
|
}
|
|
|
|
|
2015-11-07 01:11:25 +00:00
|
|
|
bool CGeneralOptionsPage::EnableReset(void)
|
2008-11-14 20:51:06 +00:00
|
|
|
{
|
2015-12-23 20:04:36 +00:00
|
|
|
if (CSettingsPageImpl<CGeneralOptionsPage>::EnableReset()) { return true; }
|
|
|
|
return false;
|
2008-11-14 20:51:06 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
void CGeneralOptionsPage::ResetPage()
|
|
|
|
{
|
2015-12-23 20:04:36 +00:00
|
|
|
CSettingsPageImpl<CGeneralOptionsPage>::ResetPage();
|
|
|
|
m_SettingsConfig->UpdateAdvanced((int)::SendMessage(GetDlgItem(IDC_BASIC_MODE), BM_GETCHECK, 0, 0) == 0);
|
2008-11-14 20:51:06 +00:00
|
|
|
}
|
2012-09-27 06:57:51 +00:00
|
|
|
|
2015-11-07 01:11:25 +00:00
|
|
|
void CGeneralOptionsPage::OnBasicMode(UINT Code, int id, HWND ctl)
|
2012-09-27 06:57:51 +00:00
|
|
|
{
|
2015-12-23 20:04:36 +00:00
|
|
|
CheckBoxChanged(Code, id, ctl);
|
|
|
|
m_SettingsConfig->UpdateAdvanced((int)::SendMessage(ctl, BM_GETCHECK, 0, 0) == 0);
|
|
|
|
}
|