124 |
124 |
125 UITableViewCell *cell = [aTableView dequeueReusableCellWithIdentifier:CellIdentifier]; |
125 UITableViewCell *cell = [aTableView dequeueReusableCellWithIdentifier:CellIdentifier]; |
126 if (cell == nil) |
126 if (cell == nil) |
127 cell = [[[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:CellIdentifier] autorelease]; |
127 cell = [[[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:CellIdentifier] autorelease]; |
128 |
128 |
129 if (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPad) |
129 if (IS_IPAD()) |
130 cell.textLabel.textColor = UICOLOR_HW_YELLOW_TEXT; |
130 cell.textLabel.textColor = UICOLOR_HW_YELLOW_TEXT; |
131 |
131 |
132 if (self.dataSourceArray == nil) |
132 if (self.dataSourceArray == nil) |
133 [self loadDataSourceArray]; |
133 [self loadDataSourceArray]; |
134 NSArray *source = [self.dataSourceArray objectAtIndex:scIndex]; |
134 NSArray *source = [self.dataSourceArray objectAtIndex:scIndex]; |
135 |
135 |
136 NSString *labelString = [source objectAtIndex:row]; |
136 NSString *labelString = [source objectAtIndex:row]; |
137 cell.textLabel.text = labelString; |
137 cell.textLabel.text = labelString; |
|
138 cell.textLabel.adjustsFontSizeToFitWidth = YES; |
|
139 cell.textLabel.minimumFontSize = 7; |
138 |
140 |
139 if (isRandomness()) { |
141 if (isRandomness()) { |
140 UIImage *image = [[UIImage alloc] initWithContentsOfFile:[NSString stringWithFormat:@"%@/%@/icon.png",THEMES_DIRECTORY(),labelString]]; |
142 UIImage *image = [[UIImage alloc] initWithContentsOfFile:[NSString stringWithFormat:@"%@/%@/icon.png",THEMES_DIRECTORY(),labelString]]; |
141 cell.imageView.image = image; |
143 cell.imageView.image = image; |
142 [image release]; |
144 [image release]; |
348 self.mapGenCommand = mapgen; |
350 self.mapGenCommand = mapgen; |
349 self.staticMapCommand = staticmap; |
351 self.staticMapCommand = staticmap; |
350 self.missionCommand = mission; |
352 self.missionCommand = mission; |
351 |
353 |
352 // nice animation for updating the table when appropriate (on iphone) |
354 // nice animation for updating the table when appropriate (on iphone) |
353 if (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPhone) |
355 if (IS_IPAD()) |
354 if (((oldPage == 0 || oldPage == 2) && (newPage == 1 || newPage == 3)) || |
356 if (((oldPage == 0 || oldPage == 2) && (newPage == 1 || newPage == 3)) || |
355 ((oldPage == 1 || oldPage == 3) && (newPage == 0 || newPage == 2)) || |
357 ((oldPage == 1 || oldPage == 3) && (newPage == 0 || newPage == 2)) || |
356 ((oldPage == 1 && newPage == 3) || (oldPage == 3 || newPage == 1))) { |
358 ((oldPage == 1 && newPage == 3) || (oldPage == 3 || newPage == 1))) { |
357 self.tableView.frame = CGRectMake(480, 0, 185, 276); |
359 self.tableView.frame = CGRectMake(480, 0, 185, 276); |
358 [UIView beginAnimations:@"moving in table" context:NULL]; |
360 [UIView beginAnimations:@"moving in table" context:NULL]; |
419 self.mazeSizeCommand = @"e$maze_size 0"; |
421 self.mazeSizeCommand = @"e$maze_size 0"; |
420 self.mapGenCommand = @"e$mapgen 0"; |
422 self.mapGenCommand = @"e$mapgen 0"; |
421 self.staticMapCommand = @""; |
423 self.staticMapCommand = @""; |
422 self.missionCommand = @""; |
424 self.missionCommand = @""; |
423 |
425 |
424 if (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPad) { |
426 if (IS_IPAD()) { |
425 [self.tableView setBackgroundView:nil]; |
427 [self.tableView setBackgroundView:nil]; |
426 self.view.backgroundColor = [UIColor clearColor]; |
428 self.view.backgroundColor = [UIColor clearColor]; |
427 self.tableView.separatorColor = UICOLOR_HW_YELLOW_BODER; |
429 self.tableView.separatorColor = UICOLOR_HW_YELLOW_BODER; |
428 self.tableView.separatorStyle = UITableViewCellSeparatorStyleNone; |
430 self.tableView.separatorStyle = UITableViewCellSeparatorStyleNone; |
429 self.tableView.rowHeight = 45; |
431 self.tableView.rowHeight = 45; |