Added the notion of a 'cancel' button, and unified all the 'cancel' menu IDs to be kCancelMenuID (ie -1). I've slaved the Menu button (ie Esc on win, 'Start' button on PSP) to this - the idea being, if you hit the Menu button to bring up a menu, hitting it again will dismiss it without doing anything, which is pretty standard behavior for most console/computer games.

This commit is contained in:
wrenczes@gmail.com
2010-11-07 02:08:17 +00:00
parent b0c61049da
commit 3c19533a4c
13 changed files with 303 additions and 274 deletions

View File

@@ -129,7 +129,7 @@ void GameStateDuel::Start()
fillDeckMenu(deckmenu,RESPATH"/player/premade");
}
deckmenu->Add( MENUITEM_NEW_DECK, "New Deck...", "Create a new deck to play with.");
deckmenu->Add( MENUITEM_MAIN_MENU, "Main Menu", "Return to Main Menu");
deckmenu->Add( MENUITEM_CANCEL, "Main Menu", "Return to Main Menu");
}
for (int i = 0; i < 2; ++i){
@@ -556,7 +556,7 @@ void GameStateDuel::ButtonPressed(int controllerId, int controlId) {
mGamePhase = DUEL_STATE_CHOOSE_DECK2_TO_PLAY;
break;
}
else if (controlId == MENUITEM_MAIN_MENU ) // user clicked on "Cancel"
else if (controlId == MENUITEM_MAIN_MENU || controlId == MENUITEM_CANCEL ) // user clicked on "Cancel"
{
if (deckmenu)
deckmenu->Close();