From fd32f2af7f62f17d42292b6538903a37b0b5e563 Mon Sep 17 00:00:00 2001 From: Starla Insigna Date: Tue, 23 Aug 2011 13:21:56 -0400 Subject: Added game quitting safeguard to pause screen (version 0.3.1) Also replaced instances of the term "Cart Collect" in Tutorial with "Cartographic". Also modified level selection screen to remember your position in the list rather than simply the last mode you'd played. Closes #211 --- Classes/GameMode.m | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'Classes/GameMode.m') diff --git a/Classes/GameMode.m b/Classes/GameMode.m index 7b07f15..8f695d1 100644 --- a/Classes/GameMode.m +++ b/Classes/GameMode.m @@ -146,7 +146,9 @@ - (void)mainmenu { - [[CCDirector sharedDirector] replaceScene:[MainMenuLayer scene]]; + UIAlertView* alert = [[UIAlertView alloc] initWithTitle:@"Cartographic" message:@"Are you sure you want to quit the currently playing game?" delegate:self cancelButtonTitle:@"Yes" otherButtonTitles:@"No", nil]; + [alert show]; + [alert release]; } - (void)setScore:(int)m_score @@ -179,6 +181,14 @@ delayedAction = nil; } +- (void)alertView:(UIAlertView *)alertView didDismissWithButtonIndex:(NSInteger)buttonIndex +{ + if (buttonIndex == 0) + { + [[CCDirector sharedDirector] replaceScene:[MainMenuLayer scene]]; + } +} + - (void)dealloc { [objects release]; -- cgit 1.4.1