project_files/HedgewarsMobile/Classes/MapPreviewButtonView.m
changeset 4082 bfe14b38dad1
parent 3910 dd47efbdec46
child 4356 d1d26f8963a3
equal deleted inserted replaced
4081:d4cb8f216724 4082:bfe14b38dad1
   194     // remove the current preview and title
   194     // remove the current preview and title
   195     [self setImage:nil forState:UIControlStateNormal];
   195     [self setImage:nil forState:UIControlStateNormal];
   196     [self setTitle:nil forState:UIControlStateNormal];
   196     [self setTitle:nil forState:UIControlStateNormal];
   197     
   197     
   198     // don't display preview on slower device, too slow and memory hog
   198     // don't display preview on slower device, too slow and memory hog
   199     NSString *modelId = modelType();
   199     if (IS_NOT_POWERFUL()) {
   200     if ([modelId hasPrefix:@"iPhone1"] || [modelId hasPrefix:@"iPod1,1"] || [modelId hasPrefix:@"iPod2,1"]) {
       
   201         //self.delegate.busy = NO;
       
   202         [self setTitle:NSLocalizedString(@"Preview not available",@"") forState:UIControlStateNormal];
   200         [self setTitle:NSLocalizedString(@"Preview not available",@"") forState:UIControlStateNormal];
       
   201         [self turnOnWidgets];
   203     } else {        
   202     } else {        
   204         // add a very nice spinning wheel
   203         // add a very nice spinning wheel
   205         UIActivityIndicatorView *indicator = [[UIActivityIndicatorView alloc]
   204         UIActivityIndicatorView *indicator = [[UIActivityIndicatorView alloc]
   206                                               initWithActivityIndicatorStyle:UIActivityIndicatorViewStyleWhiteLarge];
   205                                               initWithActivityIndicatorStyle:UIActivityIndicatorViewStyleWhiteLarge];
   207         indicator.center = CGPointMake(self.bounds.size.width / 2, self.bounds.size.height / 2);
   206         indicator.center = CGPointMake(self.bounds.size.width / 2, self.bounds.size.height / 2);