equal
deleted
inserted
replaced
15 |
15 |
16 @implementation GameConfigViewController |
16 @implementation GameConfigViewController |
17 |
17 |
18 |
18 |
19 -(BOOL) shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation { |
19 -(BOOL) shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation { |
20 return rotationManager(interfaceOrientation); |
20 // dirty trick to avoid rotating below the curl |
|
21 return interfaceOrientation == self.parentViewController.interfaceOrientation; |
21 } |
22 } |
22 |
23 |
23 -(IBAction) buttonPressed:(id) sender { |
24 -(IBAction) buttonPressed:(id) sender { |
24 // works even if it's not actually a button |
25 // works even if it's not actually a button |
25 UIButton *theButton = (UIButton *)sender; |
26 UIButton *theButton = (UIButton *)sender; |
102 hogs += [[teamData objectForKey:@"number"] intValue]; |
103 hogs += [[teamData objectForKey:@"number"] intValue]; |
103 |
104 |
104 if (hogs > mapConfigViewController.maxHogs) { |
105 if (hogs > mapConfigViewController.maxHogs) { |
105 UIAlertView *alert = [[UIAlertView alloc] initWithTitle:NSLocalizedString(@"Too many hogs",@"") |
106 UIAlertView *alert = [[UIAlertView alloc] initWithTitle:NSLocalizedString(@"Too many hogs",@"") |
106 message:NSLocalizedString(@"The map you selected is too small for that many hogs",@"") |
107 message:NSLocalizedString(@"The map you selected is too small for that many hogs",@"") |
|
108 delegate:nil |
|
109 cancelButtonTitle:NSLocalizedString(@"Ok, got it",@"") |
|
110 otherButtonTitles:nil]; |
|
111 [alert show]; |
|
112 [alert release]; |
|
113 return; |
|
114 } |
|
115 |
|
116 if ([schemeWeaponConfigViewController.selectedScheme length] == 0 || [schemeWeaponConfigViewController.selectedWeapon length] == 0 ) { |
|
117 UIAlertView *alert = [[UIAlertView alloc] initWithTitle:NSLocalizedString(@"Missing detail",@"") |
|
118 message:NSLocalizedString(@"Make sure you selected one Scheme and one Weapon for this game",@"") |
107 delegate:nil |
119 delegate:nil |
108 cancelButtonTitle:NSLocalizedString(@"Ok, got it",@"") |
120 cancelButtonTitle:NSLocalizedString(@"Ok, got it",@"") |
109 otherButtonTitles:nil]; |
121 otherButtonTitles:nil]; |
110 [alert show]; |
122 [alert show]; |
111 [alert release]; |
123 [alert release]; |