162 [[SDLUIKitDelegate sharedAppDelegate] startSDLgame:gameDictionary]; |
162 [[SDLUIKitDelegate sharedAppDelegate] startSDLgame:gameDictionary]; |
163 } else { |
163 } else { |
164 DLog(@"gameconfig data not complete!!\nmapConfigViewController = %@\nteamConfigViewController = %@\nschemeWeaponConfigViewController = %@\n", |
164 DLog(@"gameconfig data not complete!!\nmapConfigViewController = %@\nteamConfigViewController = %@\nschemeWeaponConfigViewController = %@\n", |
165 mapConfigViewController, teamConfigViewController, schemeWeaponConfigViewController); |
165 mapConfigViewController, teamConfigViewController, schemeWeaponConfigViewController); |
166 [self.parentViewController dismissModalViewControllerAnimated:YES]; |
166 [self.parentViewController dismissModalViewControllerAnimated:YES]; |
|
167 |
|
168 // present an alert to the user, with an image on the ipad (too big for the iphone) |
|
169 NSString *msg = NSLocalizedString(@"Something went wrong with your configuration. Please try again.",@""); |
|
170 if (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPad) |
|
171 msg = [msg stringByAppendingString:@"\n\n\n\n\n\n\n\n"]; // this makes space for the image |
|
172 |
|
173 UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@"Whoops" |
|
174 message:msg |
|
175 delegate:nil |
|
176 cancelButtonTitle:@"Ok" |
|
177 otherButtonTitles:nil]; |
|
178 |
|
179 if (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPad) { |
|
180 UIImageView *deniedImg = [[UIImageView alloc] initWithImage:[UIImage imageWithContentsOfFile:@"denied.png"]]; |
|
181 deniedImg.frame = CGRectMake(25, 80, 240, 160); |
|
182 [alert addSubview:deniedImg]; |
|
183 [deniedImg release]; |
|
184 } |
|
185 [alert show]; |
|
186 [alert release]; |
167 } |
187 } |
168 |
188 |
169 } |
189 } |
170 |
190 |
171 -(void) viewDidLoad { |
191 -(void) viewDidLoad { |