J :
* 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:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user