project_files/HedgewarsMobile/Classes/MapConfigViewController.m
branchios-revival
changeset 11206 2e80c9861818
parent 11148 064a53861759
child 11226 628ac6f8a41e
equal deleted inserted replaced
11205:9fd7b8d3cf4d 11206:2e80c9861818
    60         // the preview for static maps is loaded in didSelectRowAtIndexPath
    60         // the preview for static maps is loaded in didSelectRowAtIndexPath
    61     }
    61     }
    62     [seed release];
    62     [seed release];
    63 
    63 
    64     // perform as if user clicked on an entry
    64     // perform as if user clicked on an entry
    65     NSIndexPath *theIndex = [NSIndexPath indexPathForRow:(random()%[source count]) inSection:0];
    65     NSIndexPath *theIndex = [NSIndexPath indexPathForRow:arc4random_uniform((int)[source count]) inSection:0];
    66     [self tableView:self.tableView didSelectRowAtIndexPath:theIndex];
    66     [self tableView:self.tableView didSelectRowAtIndexPath:theIndex];
    67     if (IS_NOT_POWERFUL([HWUtils modelType]) == NO)
    67     if (IS_NOT_POWERFUL([HWUtils modelType]) == NO)
    68         [self.tableView scrollToRowAtIndexPath:theIndex atScrollPosition:UITableViewScrollPositionMiddle animated:YES];
    68         [self.tableView scrollToRowAtIndexPath:theIndex atScrollPosition:UITableViewScrollPositionMiddle animated:YES];
    69 }
    69 }
    70 
    70 
   401     return dataSourceArray;
   401     return dataSourceArray;
   402 }
   402 }
   403 
   403 
   404 -(void) viewDidLoad {
   404 -(void) viewDidLoad {
   405     [super viewDidLoad];
   405     [super viewDidLoad];
   406     srandom(time(NULL));
       
   407 
   406 
   408     // initialize some "default" values
   407     // initialize some "default" values
   409     self.slider.value = 0.05f;
   408     self.slider.value = 0.05f;
   410     self.slider.enabled = NO;
   409     self.slider.enabled = NO;
   411     self.oldValue = 5;
   410     self.oldValue = 5;