Jeck - Canceling the name for a new deck drops the player back to deck selection.

This commit is contained in:
wagic.jeck
2009-09-23 19:46:08 +00:00
parent f907f39334
commit efc47e84d5
+11 -1
View File
@@ -220,6 +220,12 @@ void GameStateDeckViewer::Update(float dt)
myDeck->parent->meta_name = newDeckname; myDeck->parent->meta_name = newDeckname;
myDeck->save(); myDeck->save();
} }
mStage = STAGE_WAITING;
}
//They cancelled, so dump them back to where they were.
else {
updateDecks();
mStage = STAGE_WELCOME;
} }
newDeckname = ""; newDeckname = "";
} }
@@ -739,7 +745,11 @@ void GameStateDeckViewer::ButtonPressed(int controllerId, int controlId)
sprintf(buf,"deck%i",deckNum); sprintf(buf,"deck%i",deckNum);
options.keypadStart(buf,&newDeckname); options.keypadStart(buf,&newDeckname);
options.keypadTitle("Deck name"); options.keypadTitle("Deck name");
//Fallthrough to deck editing. loadDeck(controlId);
deckNum = controlId;
//Doesn't fallthrough to deck editing.
//Only change states when keypad finished.
break;
} }
loadDeck(controlId); loadDeck(controlId);
mStage = STAGE_WAITING; mStage = STAGE_WAITING;