project_files/HedgewarsMobile/Classes/GameConfigViewController.m
changeset 3911 46d7a5cf8ac6
parent 3893 568bfd083465
child 3923 694e6f6e0e30
equal deleted inserted replaced
3910:dd47efbdec46 3911:46d7a5cf8ac6
   181                                                                       mapConfigViewController.templateFilterCommand,@"templatefilter_command",
   181                                                                       mapConfigViewController.templateFilterCommand,@"templatefilter_command",
   182                                                                       mapConfigViewController.mapGenCommand,@"mapgen_command",
   182                                                                       mapConfigViewController.mapGenCommand,@"mapgen_command",
   183                                                                       mapConfigViewController.mazeSizeCommand,@"mazesize_command",
   183                                                                       mapConfigViewController.mazeSizeCommand,@"mazesize_command",
   184                                                                       mapConfigViewController.themeCommand,@"theme_command",
   184                                                                       mapConfigViewController.themeCommand,@"theme_command",
   185                                                                       mapConfigViewController.staticMapCommand,@"staticmap_command",
   185                                                                       mapConfigViewController.staticMapCommand,@"staticmap_command",
       
   186                                                                       mapConfigViewController.missionCommand,@"mission_command",  
   186                                                                       teamConfigViewController.listOfSelectedTeams,@"teams_list",
   187                                                                       teamConfigViewController.listOfSelectedTeams,@"teams_list",
   187                                                                       schemeWeaponConfigViewController.selectedScheme,@"scheme",
   188                                                                       schemeWeaponConfigViewController.selectedScheme,@"scheme",
   188                                                                       schemeWeaponConfigViewController.selectedWeapon,@"weapon",
   189                                                                       schemeWeaponConfigViewController.selectedWeapon,@"weapon",
   189                                                                       nil];
   190                                                                       nil];
   190 
   191 
   191     // finally launch game and remove this controller
   192     // finally launch game and remove this controller
   192     DLog(@"sending config %@", gameDictionary);
   193     DLog(@"sending config %@", gameDictionary);
   193 
   194 
   194     if ([[gameDictionary allKeys] count] == 9) {
   195     if ([[gameDictionary allKeys] count] == 10) {
   195         NSDictionary *allDataNecessary = [NSDictionary dictionaryWithObjectsAndKeys:gameDictionary,@"game_dictionary", @"",@"savefile",
   196         NSDictionary *allDataNecessary = [NSDictionary dictionaryWithObjectsAndKeys:gameDictionary,@"game_dictionary", @"",@"savefile",
   196                                                                                     [NSNumber numberWithBool:NO],@"netgame", nil];
   197                                                                                     [NSNumber numberWithBool:NO],@"netgame", nil];
   197         [[SDLUIKitDelegate sharedAppDelegate] startSDLgame:allDataNecessary];
   198         [[SDLUIKitDelegate sharedAppDelegate] startSDLgame:allDataNecessary];
       
   199         
       
   200         // tell controllers that they're being reloaded
       
   201         [mapConfigViewController viewWillAppear:YES];
   198     } else {
   202     } else {
   199         DLog(@"gameconfig data not complete!!\nmapConfigViewController = %@\nteamConfigViewController = %@\nschemeWeaponConfigViewController = %@\n",
   203         DLog(@"gameconfig data not complete!!\nmapConfigViewController = %@\nteamConfigViewController = %@\nschemeWeaponConfigViewController = %@\n",
   200              mapConfigViewController, teamConfigViewController, schemeWeaponConfigViewController);
   204              mapConfigViewController, teamConfigViewController, schemeWeaponConfigViewController);
   201         [self.parentViewController dismissModalViewControllerAnimated:YES];
   205         [self.parentViewController dismissModalViewControllerAnimated:YES];
   202 
   206