2016-01-27 09:11:59 +00:00
|
|
|
/****************************************************************************
|
|
|
|
* *
|
|
|
|
* Project64 - A Nintendo 64 emulator. *
|
|
|
|
* http://www.pj64-emu.com/ *
|
|
|
|
* Copyright (C) 2012 Project64. All rights reserved. *
|
|
|
|
* *
|
|
|
|
* License: *
|
|
|
|
* GNU/GPLv2 http://www.gnu.org/licenses/gpl-2.0.html *
|
|
|
|
* *
|
|
|
|
****************************************************************************/
|
|
|
|
#include "stdafx.h"
|
|
|
|
|
|
|
|
#include "SettingsPage.h"
|
|
|
|
#include "SettingsPage-Game-Status.h"
|
|
|
|
|
|
|
|
CGameStatusPage::CGameStatusPage(HWND hParent, const RECT & rcDispay)
|
|
|
|
{
|
2016-04-12 07:55:36 +00:00
|
|
|
if (!Create(hParent, rcDispay))
|
|
|
|
{
|
|
|
|
return;
|
|
|
|
}
|
2016-01-27 09:11:59 +00:00
|
|
|
|
2016-04-12 07:55:36 +00:00
|
|
|
CIniFile RomIniFile(g_Settings->LoadStringVal(SupportFile_RomDatabase).c_str());
|
2018-11-18 01:06:02 +00:00
|
|
|
CIniFile::strlist Keys;
|
2016-04-12 07:55:36 +00:00
|
|
|
RomIniFile.GetKeyList("Rom Status", Keys);
|
2016-04-13 07:34:19 +00:00
|
|
|
stdstr Status = UISettingsLoadStringVal(Rdb_Status);
|
2016-01-27 09:11:59 +00:00
|
|
|
|
2016-04-12 07:55:36 +00:00
|
|
|
CModifiedComboBoxTxt * ComboBox;
|
|
|
|
ComboBox = AddModComboBoxTxt(GetDlgItem(IDC_STATUS_TYPE), Rdb_Status);
|
|
|
|
if (ComboBox)
|
|
|
|
{
|
2018-11-18 01:06:02 +00:00
|
|
|
for (CIniFile::strlist::iterator item = Keys.begin(); item != Keys.end(); item++)
|
2016-04-12 07:55:36 +00:00
|
|
|
{
|
|
|
|
if (strstr(item->c_str(), ".Sel") != NULL) { continue; }
|
|
|
|
if (strstr(item->c_str(), ".Auto") != NULL) { continue; }
|
2020-05-12 12:19:05 +00:00
|
|
|
ComboBox->AddItem(stdstr(*item).ToUTF16().c_str(), item->c_str());
|
2016-04-12 07:55:36 +00:00
|
|
|
}
|
|
|
|
ComboBox->SetTextField(GetDlgItem(IDC_STATUS_TEXT));
|
|
|
|
}
|
|
|
|
CModifiedEditBox * TxtBox;
|
|
|
|
TxtBox = AddModTextBox(GetDlgItem(IDC_NOTES_CORE), Rdb_NotesCore, true);
|
|
|
|
TxtBox->SetTextField(GetDlgItem(IDC_NOTES_CORE_TEXT));
|
|
|
|
TxtBox = AddModTextBox(GetDlgItem(IDC_NOTES_PLUGIN), Rdb_NotesPlugin, true);
|
|
|
|
TxtBox->SetTextField(GetDlgItem(IDC_NOTES_PLUGIN_TEXT));
|
2016-01-27 09:11:59 +00:00
|
|
|
|
2016-04-12 07:55:36 +00:00
|
|
|
UpdatePageSettings();
|
2016-01-27 09:11:59 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
void CGameStatusPage::ShowPage()
|
|
|
|
{
|
2016-04-12 07:55:36 +00:00
|
|
|
ShowWindow(SW_SHOW);
|
2016-01-27 09:11:59 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
void CGameStatusPage::HidePage()
|
|
|
|
{
|
2016-04-12 07:55:36 +00:00
|
|
|
ShowWindow(SW_HIDE);
|
2016-01-27 09:11:59 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
void CGameStatusPage::ApplySettings(bool UpdateScreen)
|
|
|
|
{
|
2016-04-12 07:55:36 +00:00
|
|
|
CSettingsPageImpl<CGameStatusPage>::ApplySettings(UpdateScreen);
|
2016-01-27 09:11:59 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
bool CGameStatusPage::EnableReset(void)
|
|
|
|
{
|
2016-04-12 07:55:36 +00:00
|
|
|
if (CSettingsPageImpl<CGameStatusPage>::EnableReset()) { return true; }
|
|
|
|
return false;
|
2016-01-27 09:11:59 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
void CGameStatusPage::ResetPage()
|
|
|
|
{
|
2016-04-12 07:55:36 +00:00
|
|
|
CSettingsPageImpl<CGameStatusPage>::ResetPage();
|
|
|
|
}
|