project_files/HedgewarsMobile/Classes/GameConfigViewController.m
branchios-revival
changeset 11121 182a42b79610
parent 11120 83c0d96f86ea
child 11122 2b4e89e5203b
equal deleted inserted replaced
11120:83c0d96f86ea 11121:182a42b79610
    67         case 2:
    67         case 2:
    68             [[AudioManagerController mainManager] playClickSound];
    68             [[AudioManagerController mainManager] playClickSound];
    69             if (self.helpPage == nil)
    69             if (self.helpPage == nil)
    70                 self.helpPage = [[HelpPageLobbyViewController alloc] initWithNibName:@"HelpPageLobbyViewController-iPad" bundle:nil];
    70                 self.helpPage = [[HelpPageLobbyViewController alloc] initWithNibName:@"HelpPageLobbyViewController-iPad" bundle:nil];
    71             self.helpPage.view.alpha = 0;
    71             self.helpPage.view.alpha = 0;
       
    72             self.helpPage.view.frame = self.view.frame;
    72             [self.view addSubview:self.helpPage.view];
    73             [self.view addSubview:self.helpPage.view];
    73             [UIView beginAnimations:@"helplobby" context:NULL];
    74             [UIView beginAnimations:@"helplobby" context:NULL];
    74             self.helpPage.view.alpha = 1;
    75             self.helpPage.view.alpha = 1;
    75             [UIView commitAnimations];
    76             [UIView commitAnimations];
    76             break;
    77             break;
   102             [self.view bringSubviewToFront:schemeWeaponConfigViewController.view];
   103             [self.view bringSubviewToFront:schemeWeaponConfigViewController.view];
   103             break;
   104             break;
   104         case 3:
   105         case 3:
   105             if (helpPage == nil) {
   106             if (helpPage == nil) {
   106                 helpPage = [[HelpPageLobbyViewController alloc] initWithNibName:@"HelpPageLobbyViewController-iPhone" bundle:nil];
   107                 helpPage = [[HelpPageLobbyViewController alloc] initWithNibName:@"HelpPageLobbyViewController-iPhone" bundle:nil];
       
   108                 CGRect helpPageFrame = self.view.frame;
       
   109                 helpPageFrame.size.height -= 44; //toolbar height
       
   110                 self.helpPage.view.frame = helpPageFrame;
   107                 [self.view addSubview:helpPage.view];
   111                 [self.view addSubview:helpPage.view];
   108             }
   112             }
   109             // this message is compulsory otherwise the table won't be loaded at all
   113             // this message is compulsory otherwise the table won't be loaded at all
   110             [helpPage viewWillAppear:NO];
   114             [helpPage viewWillAppear:NO];
   111             [self.view bringSubviewToFront:helpPage.view];
   115             [self.view bringSubviewToFront:helpPage.view];
   342         self.mapConfigViewController.slider.frame = CGRectMake(475, 983, 180, 23);
   346         self.mapConfigViewController.slider.frame = CGRectMake(475, 983, 180, 23);
   343     }
   347     }
   344 
   348 
   345     [self.schemeWeaponConfigViewController willAnimateRotationToInterfaceOrientation:toInterfaceOrientation
   349     [self.schemeWeaponConfigViewController willAnimateRotationToInterfaceOrientation:toInterfaceOrientation
   346                                                                             duration:duration];
   350                                                                             duration:duration];
       
   351     if (self.helpPage)
       
   352     {
       
   353         self.helpPage.view.frame = self.view.frame;
       
   354     }
   347 }
   355 }
   348 
   356 
   349 -(void) viewWillAppear:(BOOL)animated {
   357 -(void) viewWillAppear:(BOOL)animated {
   350 //    if (IS_IPAD())
   358 //    if (IS_IPAD())
   351 //        [NSThread detachNewThreadSelector:@selector(loadNiceHogs) toTarget:self withObject:nil];
   359 //        [NSThread detachNewThreadSelector:@selector(loadNiceHogs) toTarget:self withObject:nil];