project_files/HedgewarsMobile/Classes/GameConfigViewController.m
changeset 3525 1d7b056ff866
parent 3523 6592fbb969da
child 3546 ccf4854df294
equal deleted inserted replaced
3523:6592fbb969da 3525:1d7b056ff866
   129     [[self parentViewController] dismissModalViewControllerAnimated:YES];
   129     [[self parentViewController] dismissModalViewControllerAnimated:YES];
   130     [[SDLUIKitDelegate sharedAppDelegate] startSDLgame];
   130     [[SDLUIKitDelegate sharedAppDelegate] startSDLgame];
   131 }
   131 }
   132 
   132 
   133 -(void) viewDidLoad {
   133 -(void) viewDidLoad {
       
   134     CGRect screen = [[UIScreen mainScreen] bounds];
       
   135     self.view.frame = CGRectMake(0, 0, screen.size.height, screen.size.width);
       
   136 
   134     if (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPad) {
   137     if (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPad) {
   135         if (mapConfigViewController == nil)
   138         if (mapConfigViewController == nil)
   136             mapConfigViewController = [[MapConfigViewController alloc] initWithNibName:@"MapConfigViewController-iPad" bundle:nil];
   139             mapConfigViewController = [[MapConfigViewController alloc] initWithNibName:@"MapConfigViewController-iPad" bundle:nil];
   137         if (teamConfigViewController == nil)
   140         if (teamConfigViewController == nil)
   138             teamConfigViewController = [[TeamConfigViewController alloc] initWithStyle:UITableViewStylePlain];
   141             teamConfigViewController = [[TeamConfigViewController alloc] initWithStyle:UITableViewStylePlain];
   142         if (schemeWeaponConfigViewController == nil)
   145         if (schemeWeaponConfigViewController == nil)
   143             schemeWeaponConfigViewController = [[SchemeWeaponConfigViewController alloc] initWithStyle:UITableViewStyleGrouped];
   146             schemeWeaponConfigViewController = [[SchemeWeaponConfigViewController alloc] initWithStyle:UITableViewStyleGrouped];
   144         schemeWeaponConfigViewController.view.frame = CGRectMake(362, 224, 300, 500);
   147         schemeWeaponConfigViewController.view.frame = CGRectMake(362, 224, 300, 500);
   145         schemeWeaponConfigViewController.view.backgroundColor = [UIColor clearColor];
   148         schemeWeaponConfigViewController.view.backgroundColor = [UIColor clearColor];
   146         [mapConfigViewController.view addSubview:schemeWeaponConfigViewController.view];
   149         [mapConfigViewController.view addSubview:schemeWeaponConfigViewController.view];
       
   150         for (UIView *oneView in self.view.subviews) {
       
   151             if ([oneView isMemberOfClass:[UIToolbar class]]) {
       
   152                 [[oneView viewWithTag:12345] setHidden:YES];
       
   153                 break;
       
   154             }
       
   155         }
   147     } else
   156     } else
   148         mapConfigViewController = [[MapConfigViewController alloc] initWithNibName:@"MapConfigViewController-iPhone" bundle:nil];
   157         mapConfigViewController = [[MapConfigViewController alloc] initWithNibName:@"MapConfigViewController-iPhone" bundle:nil];
   149     activeController = mapConfigViewController;
   158     activeController = mapConfigViewController;
   150     
   159     
   151     [self.view addSubview:mapConfigViewController.view];
   160     [self.view addSubview:mapConfigViewController.view];