216 filePath,@"savefile", |
216 filePath,@"savefile", |
217 [NSNumber numberWithBool:NO],@"netgame", |
217 [NSNumber numberWithBool:NO],@"netgame", |
218 [NSDictionary dictionaryWithObject:[NSNumber numberWithInt:self.interfaceOrientation] forKey:@"orientation"],@"game_dictionary", |
218 [NSDictionary dictionaryWithObject:[NSNumber numberWithInt:self.interfaceOrientation] forKey:@"orientation"],@"game_dictionary", |
219 nil]; |
219 nil]; |
220 |
220 |
|
221 // also modify GameConfigViewController.m |
221 StatsPageViewController *statsPage = [[StatsPageViewController alloc] initWithStyle:UITableViewStyleGrouped]; |
222 StatsPageViewController *statsPage = [[StatsPageViewController alloc] initWithStyle:UITableViewStyleGrouped]; |
222 statsPage.modalTransitionStyle = UIModalTransitionStyleCoverVertical; |
223 statsPage.modalTransitionStyle = UIModalTransitionStyleCoverVertical; |
223 if ([statsPage respondsToSelector:@selector(setModalPresentationStyle:)]) |
224 if ([statsPage respondsToSelector:@selector(setModalPresentationStyle:)]) |
224 statsPage.modalPresentationStyle = UIModalPresentationPageSheet; |
225 statsPage.modalPresentationStyle = UIModalPresentationPageSheet; |
225 [self presentModalViewController:statsPage animated:NO]; |
226 // avoid showing the stat page immediately, but wait for 3 seconds |
226 |
227 [self performSelector:@selector(presentModalViewController:animated:) withObject:statsPage afterDelay:3]; |
227 // also modify GameConfigViewController.m |
228 |
228 NSArray *stats = [[SDLUIKitDelegate sharedAppDelegate] startSDLgame:allDataNecessary]; |
229 NSArray *stats = [[SDLUIKitDelegate sharedAppDelegate] startSDLgame:allDataNecessary]; |
229 if ([stats count] <= 1) { |
230 if ([stats count] <= 1) { |
230 DLog(@"%@",stats); |
231 DLog(@"%@",stats); |
231 [statsPage dismissModalViewControllerAnimated:NO]; |
232 [statsPage dismissModalViewControllerAnimated:NO]; |
232 } else { |
233 } else { |