project_files/HedgewarsMobile/Classes/SquareButtonView.m
changeset 3917 4c243b1eac97
parent 3829 81db3c85784b
child 4976 088d40d8aba2
equal deleted inserted replaced
3916:e7d665a4ef42 3917:4c243b1eac97
    30 -(id) initWithFrame:(CGRect)frame {
    30 -(id) initWithFrame:(CGRect)frame {
    31     if ((self = [super initWithFrame:frame])) {
    31     if ((self = [super initWithFrame:frame])) {
    32         colorIndex = -1;
    32         colorIndex = -1;
    33         selectedColor = 0;
    33         selectedColor = 0;
    34 
    34 
    35         // list of allowed colors
    35         self.colorArray = getAvailableColors();
    36         NSArray *colors = [[NSArray alloc] initWithObjects: [NSNumber numberWithUnsignedInt:4421353],    // bluette
       
    37                                                             [NSNumber numberWithUnsignedInt:4100897],    // greeeen
       
    38                                                             [NSNumber numberWithUnsignedInt:10632635],   // violett
       
    39                                                             [NSNumber numberWithUnsignedInt:16749353],   // oranngy
       
    40                                                             [NSNumber numberWithUnsignedInt:14483456],   // reddish
       
    41                                                             [NSNumber numberWithUnsignedInt:7566195],    // graaaay
       
    42                                                             nil];
       
    43         self.colorArray = colors;
       
    44         [colors release];
       
    45 
    36 
    46         // set the color to the first available one
    37         // set the color to the first available one
    47         [self nextColor];
    38         [self nextColor];
    48 
    39 
    49         // this makes the button round and nice with a border
    40         // this makes the button round and nice with a border