24 #import "TeamConfigViewController.h" |
24 #import "TeamConfigViewController.h" |
25 #import "SchemeWeaponConfigViewController.h" |
25 #import "SchemeWeaponConfigViewController.h" |
26 #import "HelpPageViewController.h" |
26 #import "HelpPageViewController.h" |
27 #import "CommodityFunctions.h" |
27 #import "CommodityFunctions.h" |
28 #import "UIImageExtra.h" |
28 #import "UIImageExtra.h" |
|
29 #import "PascalImports.h" |
29 |
30 |
30 @implementation GameConfigViewController |
31 @implementation GameConfigViewController |
31 @synthesize hedgehogImage, imgContainer, helpPage; |
32 @synthesize hedgehogImage, imgContainer, helpPage; |
32 |
33 |
33 -(BOOL) shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation { |
34 -(BOOL) shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation { |
150 [alert show]; |
151 [alert show]; |
151 [alert release]; |
152 [alert release]; |
152 return NO; |
153 return NO; |
153 } |
154 } |
154 |
155 |
155 if ([teamConfigViewController.listOfSelectedTeams count] > 6) { |
156 if ([teamConfigViewController.listOfSelectedTeams count] > HW_getMaxNumberOfTeams()) { |
156 UIAlertView *alert = [[UIAlertView alloc] initWithTitle:NSLocalizedString(@"Too many teams",@"") |
157 UIAlertView *alert = [[UIAlertView alloc] initWithTitle:NSLocalizedString(@"Too many teams",@"") |
157 message:NSLocalizedString(@"Max six teams are allowed in the same game",@"") |
158 message:NSLocalizedString(@"Max six teams are allowed in the same game",@"") |
158 delegate:nil |
159 delegate:nil |
159 cancelButtonTitle:NSLocalizedString(@"Ok, got it",@"") |
160 cancelButtonTitle:NSLocalizedString(@"Ok, got it",@"") |
160 otherButtonTitles:nil]; |
161 otherButtonTitles:nil]; |
249 mapConfigViewController = [[MapConfigViewController alloc] initWithNibName:@"MapConfigViewController-iPad" bundle:nil]; |
250 mapConfigViewController = [[MapConfigViewController alloc] initWithNibName:@"MapConfigViewController-iPad" bundle:nil]; |
250 mapConfigViewController.delegate = self; |
251 mapConfigViewController.delegate = self; |
251 mapConfigViewController.view.frame = CGRectMake(0, 0, screen.size.height, screen.size.width); |
252 mapConfigViewController.view.frame = CGRectMake(0, 0, screen.size.height, screen.size.width); |
252 if (teamConfigViewController == nil) |
253 if (teamConfigViewController == nil) |
253 teamConfigViewController = [[TeamConfigViewController alloc] initWithStyle:UITableViewStyleGrouped]; |
254 teamConfigViewController = [[TeamConfigViewController alloc] initWithStyle:UITableViewStyleGrouped]; |
254 teamConfigViewController.view.frame = CGRectMake(362, 200, 328, 480); |
255 teamConfigViewController.view.frame = CGRectMake(348, 200, 328, 480); |
255 [mapConfigViewController.view addSubview:teamConfigViewController.view]; |
256 [mapConfigViewController.view addSubview:teamConfigViewController.view]; |
256 if (schemeWeaponConfigViewController == nil) |
257 if (schemeWeaponConfigViewController == nil) |
257 schemeWeaponConfigViewController = [[SchemeWeaponConfigViewController alloc] initWithStyle:UITableViewStyleGrouped]; |
258 schemeWeaponConfigViewController = [[SchemeWeaponConfigViewController alloc] initWithStyle:UITableViewStyleGrouped]; |
258 schemeWeaponConfigViewController.view.frame = CGRectMake(10, 70, 300, 550); |
259 schemeWeaponConfigViewController.view.frame = CGRectMake(10, 70, 300, 600); |
259 [mapConfigViewController.view addSubview:schemeWeaponConfigViewController.view]; |
260 [mapConfigViewController.view addSubview:schemeWeaponConfigViewController.view]; |
260 } else { |
261 } else { |
261 // this is the visible controller |
262 // this is the visible controller |
262 mapConfigViewController = [[MapConfigViewController alloc] initWithNibName:@"MapConfigViewController-iPhone" bundle:nil]; |
263 mapConfigViewController = [[MapConfigViewController alloc] initWithNibName:@"MapConfigViewController-iPhone" bundle:nil]; |
263 // this must be loaded & added to auto set default scheme and ammo |
264 // this must be loaded & added to auto set default scheme and ammo |