project_files/HedgewarsMobile/Classes/GameConfigViewController.m
changeset 3780 7c704e69242e
parent 3778 2e61bb50cc57
child 3783 8e9daf967406
equal deleted inserted replaced
3779:3351a017d4ad 3780:7c704e69242e
   147 
   147 
   148     // finally launch game and remove this controller
   148     // finally launch game and remove this controller
   149     DLog(@"sending config %@", gameDictionary);
   149     DLog(@"sending config %@", gameDictionary);
   150 
   150 
   151     if ([[gameDictionary allKeys] count] == 9) {
   151     if ([[gameDictionary allKeys] count] == 9) {
       
   152         UIView *black = [[UIView alloc] initWithFrame:CGRectMake(0, 0, self.view.frame.size.height, self.view.frame.size.width)];
       
   153         black.opaque = YES;
       
   154         black.backgroundColor = [UIColor blackColor];
       
   155         [self.view addSubview:black];
   152         [[SDLUIKitDelegate sharedAppDelegate] startSDLgame:gameDictionary];
   156         [[SDLUIKitDelegate sharedAppDelegate] startSDLgame:gameDictionary];
       
   157         [UIView beginAnimations:@"fading in from ingame" context:NULL];
       
   158         [UIView setAnimationDuration:1];
       
   159         black.alpha = 0;
       
   160         [UIView commitAnimations];
       
   161         [black performSelector:@selector(removeFromSuperview) withObject:nil afterDelay:1];
       
   162         [black performSelector:@selector(release) withObject:nil afterDelay:1];
   153     } else {
   163     } else {
   154         DLog(@"gameconfig data not complete!!\nmapConfigViewController = %@\nteamConfigViewController = %@\nschemeWeaponConfigViewController = %@\n",
   164         DLog(@"gameconfig data not complete!!\nmapConfigViewController = %@\nteamConfigViewController = %@\nschemeWeaponConfigViewController = %@\n",
   155              mapConfigViewController, teamConfigViewController, schemeWeaponConfigViewController);
   165              mapConfigViewController, teamConfigViewController, schemeWeaponConfigViewController);
   156         [self.parentViewController dismissModalViewControllerAnimated:YES];
   166         [self.parentViewController dismissModalViewControllerAnimated:YES];
   157 
   167