Jeck - Final fix to r1109. It was reloading the old options halfway through saving the new ones.
This commit is contained in:
@@ -116,6 +116,12 @@ void GameStateOptions::Update(float dt)
|
||||
optionsMenu->Update(dt);
|
||||
break;
|
||||
}
|
||||
|
||||
if(mReload){
|
||||
options.reloadProfile(false);
|
||||
optionsTabs->Reload();
|
||||
mReload = false;
|
||||
}
|
||||
}
|
||||
|
||||
void GameStateOptions::Render()
|
||||
@@ -163,11 +169,6 @@ void GameStateOptions::Render()
|
||||
|
||||
optionsTabs->Render();
|
||||
|
||||
if(mReload){
|
||||
optionsTabs->Reload();
|
||||
mReload = false;
|
||||
}
|
||||
|
||||
if(mState == SHOW_OPTIONS_MENU)
|
||||
optionsMenu->Render();
|
||||
|
||||
|
||||
@@ -201,6 +201,7 @@ void OptionProfile::Reload(){
|
||||
populate();
|
||||
}
|
||||
void OptionProfile::populate(){
|
||||
|
||||
string temp = options[Options::ACTIVE_PROFILE].str;
|
||||
if (value >= selections.size()){ //TODO fail gracefully.
|
||||
return;
|
||||
@@ -266,14 +267,12 @@ void OptionProfile::confirmChange(bool confirmed){
|
||||
|
||||
int result;
|
||||
|
||||
if(confirmed)
|
||||
result = value;
|
||||
if(confirmed) result = value;
|
||||
else result = initialValue;
|
||||
|
||||
options[Options::ACTIVE_PROFILE] = selections[result];
|
||||
value = result;
|
||||
|
||||
options.reloadProfile(false);
|
||||
populate();
|
||||
if(listener && confirmed)
|
||||
listener->ButtonPressed(-102,5);
|
||||
|
||||
Reference in New Issue
Block a user