* Add the confirmation screen for bindings.
  - Add support for asking confirmations before exiting the menu.
  - Add support for cancelling saving of options.
  - Add support for requesting focus when the parent allows to yield.
* Recenter most options' text.
* Change the background color of the selected options (else, there is
  no way of knowing where is the cursor when both option text and
  option value are icons).
* Change symbol names to their equivalent PSP icon use in wagic.
This commit is contained in:
jean.chalard
2010-02-28 12:36:09 +00:00
parent c2549af81d
commit 168154b52d
6 changed files with 296 additions and 50 deletions
+20 -3
View File
@@ -115,6 +115,24 @@ void GameStateOptions::Update(float dt)
}
else switch(mState){
default:
case SAVE:
switch (optionsTabs->needsConfirm())
{
case WGuiBase::CONFIRM_CANCEL:
mState = SHOW_OPTIONS;
break;
case WGuiBase::CONFIRM_OK:
optionsTabs->save();
JSoundSystem::GetInstance()->SetSfxVolume(options[Options::SFXVOLUME].number);
JSoundSystem::GetInstance()->SetMusicVolume(options[Options::MUSICVOLUME].number);
mParent->DoTransition(TRANSITION_FADE,GAME_STATE_MENU);
mState = SHOW_OPTIONS;
break;
case WGuiBase::CONFIRM_NEED:
optionsTabs->yieldFocus();
break;
}
// Note : No break here : must continue to continue updating the menu elements.
case SHOW_OPTIONS: {
JGE* j = JGE::GetInstance();
JButton key;
@@ -217,10 +235,9 @@ void GameStateOptions::ButtonPressed(int controllerId, int controlId)
if(controllerId == -102)
switch (controlId){
case 1:
optionsTabs->save();
mState = SAVE;
break;
//Set Audio volume
JSoundSystem::GetInstance()->SetSfxVolume(options[Options::SFXVOLUME].number);
JSoundSystem::GetInstance()->SetMusicVolume(options[Options::MUSICVOLUME].number);
case 2:
mParent->DoTransition(TRANSITION_FADE,GAME_STATE_MENU);
break;