project_files/HedgewarsMobile/Classes/TeamConfigViewController.m
changeset 4811 3edc0cdcfe03
parent 4538 4c2dc9d75742
child 4920 bc3c077e15a2
equal deleted inserted replaced
4810:76315fdfb7a5 4811:3edc0cdcfe03
   181         cell.textLabel.backgroundColor = [UIColor clearColor];
   181         cell.textLabel.backgroundColor = [UIColor clearColor];
   182         
   182         
   183         NSString *teamPath = [NSString stringWithFormat:@"%@/%@.plist",TEAMS_DIRECTORY(),cell.textLabel.text];
   183         NSString *teamPath = [NSString stringWithFormat:@"%@/%@.plist",TEAMS_DIRECTORY(),cell.textLabel.text];
   184         NSDictionary *firstHog = [[[NSDictionary dictionaryWithContentsOfFile:teamPath] objectForKey:@"hedgehogs"] objectAtIndex:0];
   184         NSDictionary *firstHog = [[[NSDictionary dictionaryWithContentsOfFile:teamPath] objectForKey:@"hedgehogs"] objectAtIndex:0];
   185         if ([[firstHog objectForKey:@"level"] intValue] != 0) {
   185         if ([[firstHog objectForKey:@"level"] intValue] != 0) {
   186             NSString *filePath = [NSString stringWithFormat:@"%@/cyborg.png",HATS_DIRECTORY()];
   186             NSString *filePath = [[[NSBundle mainBundle] resourcePath] stringByAppendingString:@"/Settings/Images/robotBadge.png"];
   187             UIImage *sprite = [[UIImage alloc] initWithContentsOfFile:filePath andCutAt:CGRectMake(0, 2, 32, 32)];
   187             UIImage *sprite = [[UIImage alloc] initWithContentsOfFile:filePath];
   188             UIImageView *spriteView = [[UIImageView alloc] initWithImage:sprite];
   188             UIImageView *spriteView = [[UIImageView alloc] initWithImage:sprite];
   189             [sprite release];
   189             [sprite release];
   190             
   190             
   191             cell.accessoryView = spriteView;
   191             cell.accessoryView = spriteView;
   192             [spriteView release];
   192             [spriteView release];