[Project64] Cleanup Settings/SettingsPage-Game-Status.cpp

This commit is contained in:
zilmar 2016-04-12 17:55:36 +10:00
parent 7424f8bd9d
commit 04747706f2
1 changed files with 33 additions and 33 deletions

View File

@ -15,59 +15,59 @@
CGameStatusPage::CGameStatusPage(HWND hParent, const RECT & rcDispay)
{
if (!Create(hParent, rcDispay))
{
return;
}
if (!Create(hParent, rcDispay))
{
return;
}
CIniFile RomIniFile(g_Settings->LoadStringVal(SupportFile_RomDatabase).c_str());
strlist Keys;
RomIniFile.GetKeyList("Rom Status", Keys);
stdstr Status = g_Settings->LoadStringVal(Rdb_Status);
CIniFile RomIniFile(g_Settings->LoadStringVal(SupportFile_RomDatabase).c_str());
strlist Keys;
RomIniFile.GetKeyList("Rom Status", Keys);
stdstr Status = g_Settings->LoadStringVal(Rdb_Status);
CModifiedComboBoxTxt * ComboBox;
ComboBox = AddModComboBoxTxt(GetDlgItem(IDC_STATUS_TYPE), Rdb_Status);
if (ComboBox)
{
for (strlist::iterator item = Keys.begin(); item != Keys.end(); item++)
{
if (strstr(item->c_str(), ".Sel") != NULL) { continue; }
if (strstr(item->c_str(), ".Auto") != NULL) { continue; }
ComboBox->AddItem(item->c_str(), item->c_str());
}
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));
CModifiedComboBoxTxt * ComboBox;
ComboBox = AddModComboBoxTxt(GetDlgItem(IDC_STATUS_TYPE), Rdb_Status);
if (ComboBox)
{
for (strlist::iterator item = Keys.begin(); item != Keys.end(); item++)
{
if (strstr(item->c_str(), ".Sel") != NULL) { continue; }
if (strstr(item->c_str(), ".Auto") != NULL) { continue; }
ComboBox->AddItem(item->c_str(), item->c_str());
}
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));
UpdatePageSettings();
UpdatePageSettings();
}
void CGameStatusPage::ShowPage()
{
ShowWindow(SW_SHOW);
ShowWindow(SW_SHOW);
}
void CGameStatusPage::HidePage()
{
ShowWindow(SW_HIDE);
ShowWindow(SW_HIDE);
}
void CGameStatusPage::ApplySettings(bool UpdateScreen)
{
CSettingsPageImpl<CGameStatusPage>::ApplySettings(UpdateScreen);
CSettingsPageImpl<CGameStatusPage>::ApplySettings(UpdateScreen);
}
bool CGameStatusPage::EnableReset(void)
{
if (CSettingsPageImpl<CGameStatusPage>::EnableReset()) { return true; }
return false;
if (CSettingsPageImpl<CGameStatusPage>::EnableReset()) { return true; }
return false;
}
void CGameStatusPage::ResetPage()
{
CSettingsPageImpl<CGameStatusPage>::ResetPage();
}
CSettingsPageImpl<CGameStatusPage>::ResetPage();
}