equal
deleted
inserted
replaced
586 void startSpinning() { |
586 void startSpinning() { |
587 setGameRunning(NO); |
587 setGameRunning(NO); |
588 UIWindow *theWindow = [[UIApplication sharedApplication] keyWindow]; |
588 UIWindow *theWindow = [[UIApplication sharedApplication] keyWindow]; |
589 UIActivityIndicatorView *indicator = [[UIActivityIndicatorView alloc] initWithActivityIndicatorStyle:UIActivityIndicatorViewStyleWhiteLarge]; |
589 UIActivityIndicatorView *indicator = [[UIActivityIndicatorView alloc] initWithActivityIndicatorStyle:UIActivityIndicatorViewStyleWhiteLarge]; |
590 indicator.tag = ACTIVITYINDICATOR_TAG; |
590 indicator.tag = ACTIVITYINDICATOR_TAG; |
|
591 int offset; |
|
592 if ([[UIDevice currentDevice] orientation] == UIDeviceOrientationLandscapeLeft) |
|
593 offset = -120; |
|
594 else |
|
595 offset = 120; |
591 if ([[UIScreen screens] count] > 1) |
596 if ([[UIScreen screens] count] > 1) |
592 indicator.center = CGPointMake(theWindow.frame.size.width/2, theWindow.frame.size.height/2 + 118); |
597 indicator.center = CGPointMake(theWindow.frame.size.width/2, theWindow.frame.size.height/2 + offset); |
593 else |
598 else |
594 indicator.center = CGPointMake(theWindow.frame.size.width/2 + 118, theWindow.frame.size.height/2); |
599 indicator.center = CGPointMake(theWindow.frame.size.width/2 + offset, theWindow.frame.size.height/2); |
595 indicator.hidesWhenStopped = YES; |
600 indicator.hidesWhenStopped = YES; |
596 [indicator startAnimating]; |
601 [indicator startAnimating]; |
597 [theWindow addSubview:indicator]; |
602 [theWindow addSubview:indicator]; |
598 [indicator release]; |
603 [indicator release]; |
599 } |
604 } |