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"
|
|
|
|
#include "SettingsPage-Game-Status.h"
|
2008-09-18 03:15:49 +00:00
|
|
|
|
2015-11-07 01:11:25 +00:00
|
|
|
CGameStatusPage::CGameStatusPage(HWND hParent, const RECT & rcDispay)
|
2008-09-18 03:15:49 +00:00
|
|
|
{
|
2015-11-07 01:11:25 +00:00
|
|
|
if (!Create(hParent, rcDispay))
|
2008-09-18 03:15:49 +00:00
|
|
|
{
|
|
|
|
return;
|
|
|
|
}
|
2008-12-04 10:41:51 +00:00
|
|
|
|
2015-11-07 01:11:25 +00:00
|
|
|
CIniFile RomIniFile(g_Settings->LoadStringVal(SupportFile_RomDatabase).c_str());
|
2008-12-04 10:41:51 +00:00
|
|
|
strlist Keys;
|
2015-11-07 01:11:25 +00:00
|
|
|
RomIniFile.GetKeyList("Rom Status", Keys);
|
2015-10-25 10:50:28 +00:00
|
|
|
stdstr Status = g_Settings->LoadStringVal(Rdb_Status);
|
2008-12-04 10:41:51 +00:00
|
|
|
|
|
|
|
CModifiedComboBoxTxt * ComboBox;
|
2015-11-07 01:11:25 +00:00
|
|
|
ComboBox = AddModComboBoxTxt(GetDlgItem(IDC_STATUS_TYPE), Rdb_Status);
|
2008-12-04 10:41:51 +00:00
|
|
|
if (ComboBox)
|
|
|
|
{
|
2015-11-07 01:11:25 +00:00
|
|
|
for (strlist::iterator item = Keys.begin(); item != Keys.end(); item++)
|
2008-12-04 10:41:51 +00:00
|
|
|
{
|
2015-11-07 01:11:25 +00:00
|
|
|
if (strstr(item->c_str(), ".Sel") != NULL) { continue; }
|
|
|
|
if (strstr(item->c_str(), ".Auto") != NULL) { continue; }
|
2008-12-04 10:41:51 +00:00
|
|
|
ComboBox->AddItem(item->c_str(), item->c_str());
|
|
|
|
}
|
|
|
|
ComboBox->SetTextField(GetDlgItem(IDC_STATUS_TEXT));
|
|
|
|
}
|
|
|
|
CModifiedEditBox * TxtBox;
|
2015-11-07 01:11:25 +00:00
|
|
|
TxtBox = AddModTextBox(GetDlgItem(IDC_NOTES_CORE), Rdb_NotesCore, true);
|
2008-12-04 10:41:51 +00:00
|
|
|
TxtBox->SetTextField(GetDlgItem(IDC_NOTES_CORE_TEXT));
|
2015-11-07 01:11:25 +00:00
|
|
|
TxtBox = AddModTextBox(GetDlgItem(IDC_NOTES_PLUGIN), Rdb_NotesPlugin, true);
|
2008-12-04 10:41:51 +00:00
|
|
|
TxtBox->SetTextField(GetDlgItem(IDC_NOTES_PLUGIN_TEXT));
|
|
|
|
|
|
|
|
UpdatePageSettings();
|
2008-09-18 03:15:49 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
void CGameStatusPage::ShowPage()
|
|
|
|
{
|
|
|
|
ShowWindow(SW_SHOW);
|
|
|
|
}
|
|
|
|
|
|
|
|
void CGameStatusPage::HidePage()
|
|
|
|
{
|
|
|
|
ShowWindow(SW_HIDE);
|
2008-11-14 20:51:06 +00:00
|
|
|
}
|
|
|
|
|
2015-11-07 01:11:25 +00:00
|
|
|
void CGameStatusPage::ApplySettings(bool UpdateScreen)
|
2008-11-14 20:51:06 +00:00
|
|
|
{
|
2008-12-04 10:41:51 +00:00
|
|
|
CSettingsPageImpl<CGameStatusPage>::ApplySettings(UpdateScreen);
|
2008-11-14 20:51:06 +00:00
|
|
|
}
|
|
|
|
|
2015-11-07 01:11:25 +00:00
|
|
|
bool CGameStatusPage::EnableReset(void)
|
2008-11-14 20:51:06 +00:00
|
|
|
{
|
2008-12-04 10:41:51 +00:00
|
|
|
if (CSettingsPageImpl<CGameStatusPage>::EnableReset()) { return true; }
|
2008-11-14 20:51:06 +00:00
|
|
|
return false;
|
|
|
|
}
|
|
|
|
|
|
|
|
void CGameStatusPage::ResetPage()
|
|
|
|
{
|
2008-12-04 10:41:51 +00:00
|
|
|
CSettingsPageImpl<CGameStatusPage>::ResetPage();
|
|
|
|
}
|