# HG changeset patch # User koda # Date 1296689021 -3600 # Node ID 862b134284b240d94cdd3d61a9e856fab955a052 # Parent 5d10bd725efe70be37368c199437e13793aa6bdc change order of statspage/gamerun when running in dual screen diff -r 5d10bd725efe -r 862b134284b2 project_files/HedgewarsMobile/Classes/GameConfigViewController.m --- a/project_files/HedgewarsMobile/Classes/GameConfigViewController.m Wed Feb 02 23:38:44 2011 +0100 +++ b/project_files/HedgewarsMobile/Classes/GameConfigViewController.m Thu Feb 03 00:23:41 2011 +0100 @@ -239,10 +239,16 @@ statsPage.modalTransitionStyle = UIModalTransitionStyleCoverVertical; if ([statsPage respondsToSelector:@selector(setModalPresentationStyle:)]) statsPage.modalPresentationStyle = UIModalPresentationPageSheet; - // avoid showing the stat page immediately, but wait for 3 seconds - [self performSelector:@selector(presentModalViewController:animated:) withObject:statsPage afterDelay:3]; - NSArray *stats = [[SDLUIKitDelegate sharedAppDelegate] startSDLgame:allDataNecessary]; + NSArray *stats; + if (IS_DUALHEAD()) { + stats = [[SDLUIKitDelegate sharedAppDelegate] startSDLgame:allDataNecessary]; + [self presentModalViewController:statsPage animated:NO]; + } else { + [self performSelector:@selector(presentModalViewController:animated:) withObject:statsPage afterDelay:3]; + stats = [[SDLUIKitDelegate sharedAppDelegate] startSDLgame:allDataNecessary]; + } + if ([stats count] <= 1) { DLog(@"%@",stats); [statsPage dismissModalViewControllerAnimated:NO]; diff -r 5d10bd725efe -r 862b134284b2 project_files/HedgewarsMobile/Classes/InGameMenuViewController.m --- a/project_files/HedgewarsMobile/Classes/InGameMenuViewController.m Wed Feb 02 23:38:44 2011 +0100 +++ b/project_files/HedgewarsMobile/Classes/InGameMenuViewController.m Thu Feb 03 00:23:41 2011 +0100 @@ -96,11 +96,13 @@ } -(void) dismiss { - CGRect screen = [[UIScreen mainScreen] bounds]; - [UIView beginAnimations:@"hiding popover" context:NULL]; - [UIView setAnimationDuration:0.35]; - self.view.frame = CGRectMake(screen.size.height, 0, 200, 170); - [UIView commitAnimations]; + if (IS_IPAD() == NO) { + CGRect screen = [[UIScreen mainScreen] bounds]; + [UIView beginAnimations:@"hiding popover" context:NULL]; + [UIView setAnimationDuration:0.35]; + self.view.frame = CGRectMake(screen.size.height, 0, 200, 170); + [UIView commitAnimations]; + } [self.view performSelector:@selector(removeFromSuperview) withObject:nil afterDelay:0.35]; @@ -185,7 +187,7 @@ #pragma mark - #pragma mark actionSheet methods -(void) actionSheet:(UIActionSheet *)actionSheet didDismissWithButtonIndex:(NSInteger) buttonIndex { - if (IS_IPAD() == NO){ + if (IS_IPAD() == NO) { CGRect screen = [[UIScreen mainScreen] bounds]; [UIView beginAnimations:@"table width less" context:NULL]; [UIView setAnimationDuration:0.2]; diff -r 5d10bd725efe -r 862b134284b2 project_files/HedgewarsMobile/Classes/SavedGamesViewController.m --- a/project_files/HedgewarsMobile/Classes/SavedGamesViewController.m Wed Feb 02 23:38:44 2011 +0100 +++ b/project_files/HedgewarsMobile/Classes/SavedGamesViewController.m Thu Feb 03 00:23:41 2011 +0100 @@ -226,7 +226,15 @@ // avoid showing the stat page immediately, but wait for 3 seconds [self performSelector:@selector(presentModalViewController:animated:) withObject:statsPage afterDelay:3]; - NSArray *stats = [[SDLUIKitDelegate sharedAppDelegate] startSDLgame:allDataNecessary]; + NSArray *stats; + if (IS_DUALHEAD()) { + stats = [[SDLUIKitDelegate sharedAppDelegate] startSDLgame:allDataNecessary]; + [self presentModalViewController:statsPage animated:NO]; + } else { + [self performSelector:@selector(presentModalViewController:animated:) withObject:statsPage afterDelay:3]; + stats = [[SDLUIKitDelegate sharedAppDelegate] startSDLgame:allDataNecessary]; + } + if ([stats count] <= 1) { DLog(@"%@",stats); [statsPage dismissModalViewControllerAnimated:NO];