project_files/HedgewarsMobile/Classes/GameInterfaceBridge.m
changeset 5195 1bfa81f0bc21
parent 5194 851c6fbb44e6
child 5206 db775bddf771
equal deleted inserted replaced
5194:851c6fbb44e6 5195:1bfa81f0bc21
    55 }
    55 }
    56 
    56 
    57 #pragma mark -
    57 #pragma mark -
    58 // overlay with controls, become visible later, with a transparency effect since the sdlwindow is not yet created
    58 // overlay with controls, become visible later, with a transparency effect since the sdlwindow is not yet created
    59 -(void) displayOverlayLater:(id) object {
    59 -(void) displayOverlayLater:(id) object {
    60     NSDictionary *dict = (NSDictionary *)object;
    60     [self.overlayController setUseClassicMenu:[[self.systemSettings objectForKey:@"menu"] boolValue]];
    61 
    61     [self.overlayController setInitialOrientation:self.parentController.interfaceOrientation];
    62     [self.overlayController setUseClassicMenu:[[dict objectForKey:@"menu"] boolValue]];
       
    63     [self.overlayController setInitialOrientation:[[dict objectForKey:@"orientation"] intValue]];
       
    64 
    62 
    65     UIWindow *gameWindow = (IS_DUALHEAD() ? [HedgewarsAppDelegate sharedAppDelegate].uiwindow : [[UIApplication sharedApplication] keyWindow]);
    63     UIWindow *gameWindow = (IS_DUALHEAD() ? [HedgewarsAppDelegate sharedAppDelegate].uiwindow : [[UIApplication sharedApplication] keyWindow]);
    66     [gameWindow addSubview:self.overlayController.view];
    64     [gameWindow addSubview:self.overlayController.view];
    67 }
    65 }
    68 
    66 
   153         [UIView commitAnimations];
   151         [UIView commitAnimations];
   154     } else
   152     } else
   155         blackView.alpha = 1;
   153         blackView.alpha = 1;
   156 
   154 
   157     // prepare options for overlay and add it to the future sdl uiwindow
   155     // prepare options for overlay and add it to the future sdl uiwindow
   158     NSDictionary *overlayOptions = [[NSDictionary alloc] initWithObjectsAndKeys:
   156     [self performSelector:@selector(displayOverlayLater:) withObject:nil afterDelay:3];
   159                                     [NSNumber numberWithInt:self.parentController.interfaceOrientation],@"orientation",
       
   160                                     [self.systemSettings objectForKey:@"menu"],@"menu",
       
   161                                     nil];
       
   162     [self performSelector:@selector(displayOverlayLater:) withObject:overlayOptions afterDelay:3];
       
   163     [overlayOptions release];
       
   164 
   157 
   165     // SYSTEMS ARE GO!!
   158     // SYSTEMS ARE GO!!
   166     [self startGameEngine];
   159     [self startGameEngine];
   167 
   160 
   168     // now we can remove the cover with a transition
   161     // now we can remove the cover with a transition