project64/Source/Project64/UserInterface/Settings/SettingsPage-Game-Status.cpp

64 lines
1.8 KiB
C++
Raw Normal View History

2016-01-27 09:11:59 +00:00
#include "stdafx.h"
#include "SettingsPage.h"
#include "SettingsPage-Game-Status.h"
CGameStatusPage::CGameStatusPage(HWND hParent, const RECT & rcDispay)
{
if (!Create(hParent, rcDispay))
{
return;
}
2016-01-27 09:11:59 +00:00
CIniFile RomIniFile(g_Settings->LoadStringVal(SupportFile_RomDatabase).c_str());
CIniFile::strlist Keys;
RomIniFile.GetKeyList("ROM Status", Keys);
stdstr Status = UISettingsLoadStringVal(Rdb_Status);
2016-01-27 09:11:59 +00:00
CModifiedComboBoxTxt * ComboBox;
2021-03-18 00:32:37 +00:00
ComboBox = AddModComboBoxTxt(GetDlgItem(IDC_STATUS_TYPE), (SettingID)Rdb_Status);
if (ComboBox)
{
for (CIniFile::strlist::iterator item = Keys.begin(); item != Keys.end(); item++)
{
2021-04-12 11:35:39 +00:00
if (strstr(item->c_str(), ".Sel") != nullptr) { continue; }
if (strstr(item->c_str(), ".Auto") != nullptr) { continue; }
2020-05-12 12:19:05 +00:00
ComboBox->AddItem(stdstr(*item).ToUTF16().c_str(), item->c_str());
}
ComboBox->SetTextField(GetDlgItem(IDC_STATUS_TEXT));
}
CModifiedEditBox * TxtBox;
2021-03-18 00:32:37 +00:00
TxtBox = AddModTextBox(GetDlgItem(IDC_NOTES_CORE), (SettingID)Rdb_NotesCore, true);
TxtBox->SetTextField(GetDlgItem(IDC_NOTES_CORE_TEXT));
2021-03-18 00:32:37 +00:00
TxtBox = AddModTextBox(GetDlgItem(IDC_NOTES_PLUGIN), (SettingID)Rdb_NotesPlugin, true);
TxtBox->SetTextField(GetDlgItem(IDC_NOTES_PLUGIN_TEXT));
2016-01-27 09:11:59 +00:00
UpdatePageSettings();
2016-01-27 09:11:59 +00:00
}
void CGameStatusPage::ShowPage()
{
ShowWindow(SW_SHOW);
2016-01-27 09:11:59 +00:00
}
void CGameStatusPage::HidePage()
{
ShowWindow(SW_HIDE);
2016-01-27 09:11:59 +00:00
}
void CGameStatusPage::ApplySettings(bool UpdateScreen)
{
CSettingsPageImpl<CGameStatusPage>::ApplySettings(UpdateScreen);
2016-01-27 09:11:59 +00:00
}
bool CGameStatusPage::EnableReset(void)
{
if (CSettingsPageImpl<CGameStatusPage>::EnableReset()) { return true; }
return false;
2016-01-27 09:11:59 +00:00
}
void CGameStatusPage::ResetPage()
{
CSettingsPageImpl<CGameStatusPage>::ResetPage();
}