コード例 #1
0
void COptionsDirectoriesPage::ResetDirectory(CModifiedEditBox & EditBox, SettingID Type)
{
	if (!EditBox.IsChanged())
	{
		return;
	}
	stdstr dir;
	g_Settings->LoadDefaultString(Type, dir);
	EditBox.SetWindowText(dir.c_str());
	EditBox.SetReset(true);
}
コード例 #2
0
void COptionsDirectoriesPage::UpdateDirectory(CModifiedEditBox & EditBox, SettingID Type)
{
	if (EditBox.IsChanged())
	{
		stdstr dir = EditBox.GetWindowText();
		g_Settings->SaveString(Type, dir.c_str());
	}
	if (EditBox.IsReset())
	{
		g_Settings->DeleteSetting(Type);
	}
}