diff options
Diffstat (limited to 'Classes/GameMode.m')
-rw-r--r-- | Classes/GameMode.m | 12 |
1 files changed, 11 insertions, 1 deletions
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 @@ | |||
146 | 146 | ||
147 | - (void)mainmenu | 147 | - (void)mainmenu |
148 | { | 148 | { |
149 | [[CCDirector sharedDirector] replaceScene:[MainMenuLayer scene]]; | 149 | 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]; |
150 | [alert show]; | ||
151 | [alert release]; | ||
150 | } | 152 | } |
151 | 153 | ||
152 | - (void)setScore:(int)m_score | 154 | - (void)setScore:(int)m_score |
@@ -179,6 +181,14 @@ | |||
179 | delayedAction = nil; | 181 | delayedAction = nil; |
180 | } | 182 | } |
181 | 183 | ||
184 | - (void)alertView:(UIAlertView *)alertView didDismissWithButtonIndex:(NSInteger)buttonIndex | ||
185 | { | ||
186 | if (buttonIndex == 0) | ||
187 | { | ||
188 | [[CCDirector sharedDirector] replaceScene:[MainMenuLayer scene]]; | ||
189 | } | ||
190 | } | ||
191 | |||
182 | - (void)dealloc | 192 | - (void)dealloc |
183 | { | 193 | { |
184 | [objects release]; | 194 | [objects release]; |