project_files/HedgewarsMobile/Classes/GameConfigViewController.m
changeset 3548 4d220ee7c75f
parent 3547 02875b1145b7
child 3616 85d69ddb41b6
--- a/project_files/HedgewarsMobile/Classes/GameConfigViewController.m	Wed Jun 23 22:03:56 2010 +0200
+++ b/project_files/HedgewarsMobile/Classes/GameConfigViewController.m	Thu Jun 24 01:08:25 2010 +0200
@@ -17,7 +17,8 @@
 
 
 -(BOOL) shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation {
-    return rotationManager(interfaceOrientation);
+    // dirty trick to avoid rotating below the curl
+    return interfaceOrientation == self.parentViewController.interfaceOrientation;
 }
 
 -(IBAction) buttonPressed:(id) sender {
@@ -112,6 +113,17 @@
         return;
     }
     
+    if ([schemeWeaponConfigViewController.selectedScheme length] == 0 || [schemeWeaponConfigViewController.selectedWeapon length] == 0 ) {
+        UIAlertView *alert = [[UIAlertView alloc] initWithTitle:NSLocalizedString(@"Missing detail",@"")
+                                                        message:NSLocalizedString(@"Make sure you selected one Scheme and one Weapon for this game",@"")
+                                                       delegate:nil
+                                              cancelButtonTitle:NSLocalizedString(@"Ok, got it",@"")
+                                              otherButtonTitles:nil];
+        [alert show];
+        [alert release];
+        return;
+    }
+    
     // create the configuration file that is going to be sent to engine
     NSDictionary *dict = [[NSDictionary alloc] initWithObjectsAndKeys:mapConfigViewController.seedCommand,@"seed_command",
                                                                       mapConfigViewController.templateFilterCommand,@"templatefilter_command",