project_files/HedgewarsMobile/Classes/GameConfigViewController.m
changeset 3893 568bfd083465
parent 3881 e570268a9d52
child 3911 46d7a5cf8ac6
equal deleted inserted replaced
3891:f8f0d0ceb19c 3893:568bfd083465
   190 
   190 
   191     // finally launch game and remove this controller
   191     // finally launch game and remove this controller
   192     DLog(@"sending config %@", gameDictionary);
   192     DLog(@"sending config %@", gameDictionary);
   193 
   193 
   194     if ([[gameDictionary allKeys] count] == 9) {
   194     if ([[gameDictionary allKeys] count] == 9) {
   195         UIView *black = [[UIView alloc] initWithFrame:CGRectMake(0, 0, self.view.frame.size.height, self.view.frame.size.width)];
   195         NSDictionary *allDataNecessary = [NSDictionary dictionaryWithObjectsAndKeys:gameDictionary,@"game_dictionary", @"",@"savefile",
   196         black.opaque = YES;
   196                                                                                     [NSNumber numberWithBool:NO],@"netgame", nil];
   197         black.backgroundColor = [UIColor blackColor];
   197         [[SDLUIKitDelegate sharedAppDelegate] startSDLgame:allDataNecessary];
   198         [self.view addSubview:black];
       
   199         [[SDLUIKitDelegate sharedAppDelegate] startSDLgame:gameDictionary];
       
   200         [UIView beginAnimations:@"fading in from ingame" context:NULL];
       
   201         [UIView setAnimationDuration:1];
       
   202         black.alpha = 0;
       
   203         [UIView commitAnimations];
       
   204         [black performSelector:@selector(removeFromSuperview) withObject:nil afterDelay:1];
       
   205         [black performSelector:@selector(release) withObject:nil afterDelay:1];
       
   206     } else {
   198     } else {
   207         DLog(@"gameconfig data not complete!!\nmapConfigViewController = %@\nteamConfigViewController = %@\nschemeWeaponConfigViewController = %@\n",
   199         DLog(@"gameconfig data not complete!!\nmapConfigViewController = %@\nteamConfigViewController = %@\nschemeWeaponConfigViewController = %@\n",
   208              mapConfigViewController, teamConfigViewController, schemeWeaponConfigViewController);
   200              mapConfigViewController, teamConfigViewController, schemeWeaponConfigViewController);
   209         [self.parentViewController dismissModalViewControllerAnimated:YES];
   201         [self.parentViewController dismissModalViewControllerAnimated:YES];
   210 
   202