project_files/HedgewarsMobile/Classes/FlagsViewController.m
branchhedgeroid
changeset 6224 42b256eca362
parent 6104 117bdf4e7af9
child 6700 e04da46ee43c
equal deleted inserted replaced
6055:88cfcd9161d3 6224:42b256eca362
    19  */
    19  */
    20 
    20 
    21 
    21 
    22 #import "FlagsViewController.h"
    22 #import "FlagsViewController.h"
    23 #import <QuartzCore/QuartzCore.h>
    23 #import <QuartzCore/QuartzCore.h>
    24 #import "CommodityFunctions.h"
    24 
    25 
    25 
    26 @implementation FlagsViewController
    26 @implementation FlagsViewController
    27 @synthesize teamDictionary, flagArray, communityArray, lastIndexPath;
    27 @synthesize teamDictionary, flagArray, communityArray, lastIndexPath;
    28 
    28 
    29 
    29 
    98     }
    98     }
    99     NSString *flagFile = [[NSString alloc] initWithFormat:@"%@/%@", FLAGS_DIRECTORY(), flagName];
    99     NSString *flagFile = [[NSString alloc] initWithFormat:@"%@/%@", FLAGS_DIRECTORY(), flagName];
   100     UIImage *flagSprite = [[UIImage alloc] initWithContentsOfFile:flagFile];
   100     UIImage *flagSprite = [[UIImage alloc] initWithContentsOfFile:flagFile];
   101     [flagFile release];
   101     [flagFile release];
   102     cell.imageView.image = flagSprite;
   102     cell.imageView.image = flagSprite;
   103     cell.imageView.layer.borderWidth = 0.3;
       
   104     [flagSprite release];
   103     [flagSprite release];
       
   104     cell.imageView.layer.borderWidth = 1;
       
   105     cell.imageView.layer.borderColor = [[UIColor blackColor] CGColor];
   105 
   106 
   106     cell.textLabel.text = [[source objectAtIndex:row] stringByDeletingPathExtension];
   107     cell.textLabel.text = [[source objectAtIndex:row] stringByDeletingPathExtension];
   107     if ([[flagName stringByDeletingPathExtension] isEqualToString:[self.teamDictionary objectForKey:@"flag"]]) {
   108     if ([[flagName stringByDeletingPathExtension] isEqualToString:[self.teamDictionary objectForKey:@"flag"]]) {
   108         cell.accessoryType = UITableViewCellAccessoryCheckmark;
   109         cell.accessoryType = UITableViewCellAccessoryCheckmark;
   109         self.lastIndexPath = indexPath;
   110         self.lastIndexPath = indexPath;