project_files/HedgewarsMobile/Classes/GameInterfaceBridge.m
changeset 6667 142fe596e75e
parent 6656 6aeaba3ee584
child 6700 e04da46ee43c
equal deleted inserted replaced
6666:0e2f5b81cbf2 6667:142fe596e75e
    42     self.proto = engineProtocol;
    42     self.proto = engineProtocol;
    43     [engineProtocol release];
    43     [engineProtocol release];
    44     [self.proto spawnThread:self.savePath withOptions:optionsOrNil];
    44     [self.proto spawnThread:self.savePath withOptions:optionsOrNil];
    45 
    45 
    46     // add a black view hiding the background
    46     // add a black view hiding the background
    47     CGRect theFrame = [[UIScreen mainScreen] bounds];
       
    48     UIWindow *thisWindow = [[HedgewarsAppDelegate sharedAppDelegate] uiwindow];
    47     UIWindow *thisWindow = [[HedgewarsAppDelegate sharedAppDelegate] uiwindow];
    49     self.blackView = [[UIView alloc] initWithFrame:theFrame];
    48     self.blackView = [[UIView alloc] initWithFrame:[[UIScreen mainScreen] bounds]];
    50     self.blackView.opaque = YES;
    49     self.blackView.opaque = YES;
    51     self.blackView.backgroundColor = [UIColor blackColor];
    50     self.blackView.backgroundColor = [UIColor blackColor];
    52     self.blackView.alpha = 0;
    51     self.blackView.alpha = 0;
       
    52     self.blackView.autoresizingMask = UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight;
    53     [UIView beginAnimations:@"fade out" context:NULL];
    53     [UIView beginAnimations:@"fade out" context:NULL];
    54     [UIView setAnimationDuration:1];
    54     [UIView setAnimationDuration:1];
    55     self.blackView.alpha = 1;
    55     self.blackView.alpha = 1;
    56     [UIView commitAnimations];
    56     [UIView commitAnimations];
    57     [thisWindow addSubview:self.blackView];
    57     [thisWindow addSubview:self.blackView];