[Project64] Cleanup Settings/SettingsPage.h

This commit is contained in:
zilmar 2016-04-12 17:57:31 +10:00
parent 04747706f2
commit 5942722436
1 changed files with 494 additions and 495 deletions

View File

@ -53,7 +53,6 @@ protected:
{ {
delete cb_iter->second; delete cb_iter->second;
} }
} }
bool Create(HWND hParent, const RECT & rcDispay) bool Create(HWND hParent, const RECT & rcDispay)
{ {
@ -101,7 +100,8 @@ protected:
if (EditBox.IsbString()) if (EditBox.IsbString())
{ {
g_Settings->SaveString(Type, Value); g_Settings->SaveString(Type, Value);
} else { }
else {
DWORD dwValue = atoi(Value.c_str()); DWORD dwValue = atoi(Value.c_str());
g_Settings->SaveDword(Type, dwValue); g_Settings->SaveDword(Type, dwValue);
} }
@ -113,7 +113,6 @@ protected:
} }
} }
void UpdateModCheckBox(CModifiedButton & CheckBox, SettingID Type) void UpdateModCheckBox(CModifiedButton & CheckBox, SettingID Type)
{ {
if (CheckBox.IsChanged()) if (CheckBox.IsChanged())
@ -156,7 +155,8 @@ protected:
stdstr Value = g_Settings->LoadDefaultString(Type); stdstr Value = g_Settings->LoadDefaultString(Type);
EditBox.SetWindowText(Value.c_str()); EditBox.SetWindowText(Value.c_str());
EditBox.SetReset(true); EditBox.SetReset(true);
} else { }
else {
DWORD Value = g_Settings->LoadDefaultDword(Type); DWORD Value = g_Settings->LoadDefaultDword(Type);
EditBox.SetWindowText(stdstr_f("%d", Value).c_str()); EditBox.SetWindowText(stdstr_f("%d", Value).c_str());
EditBox.SetReset(true); EditBox.SetReset(true);
@ -244,7 +244,6 @@ protected:
Button->SetChanged(g_Settings->LoadBool(iter->first, SettingSelected)); Button->SetChanged(g_Settings->LoadBool(iter->first, SettingSelected));
Button->SetCheck(SettingSelected ? BST_CHECKED : BST_UNCHECKED); Button->SetCheck(SettingSelected ? BST_CHECKED : BST_UNCHECKED);
} }
} }
void UpdateComboBoxes(void) void UpdateComboBoxes(void)
@ -280,7 +279,8 @@ protected:
stdstr SelectedValue; stdstr SelectedValue;
TextBox->SetChanged(g_Settings->LoadStringVal(iter->first, SelectedValue)); TextBox->SetChanged(g_Settings->LoadStringVal(iter->first, SelectedValue));
TextBox->SetWindowText(SelectedValue.c_str()); TextBox->SetWindowText(SelectedValue.c_str());
} else { }
else {
uint32_t SelectedValue; uint32_t SelectedValue;
TextBox->SetChanged(g_Settings->LoadDword(iter->first, SelectedValue)); TextBox->SetChanged(g_Settings->LoadDword(iter->first, SelectedValue));
TextBox->SetWindowText(stdstr_f("%d", SelectedValue).c_str()); TextBox->SetWindowText(stdstr_f("%d", SelectedValue).c_str());
@ -546,7 +546,6 @@ protected:
bool m_UpdatingTxt; bool m_UpdatingTxt;
}; };
typedef std::vector<CSettingsPage *> SETTING_PAGES; typedef std::vector<CSettingsPage *> SETTING_PAGES;
class CConfigSettingSection class CConfigSettingSection