project_files/HedgewarsMobile/Classes/ExtraCategories.m
branchios-revival
changeset 11145 1c89970c7f15
parent 11140 3fbe54013b2b
child 11549 893722a2a1f9
equal deleted inserted replaced
11144:ef246004e33d 11145:1c89970c7f15
    98 @implementation UIButton (quickStyle)
    98 @implementation UIButton (quickStyle)
    99 
    99 
   100 -(id) initWithFrame:(CGRect) frame andTitle:(NSString *)title {
   100 -(id) initWithFrame:(CGRect) frame andTitle:(NSString *)title {
   101     [self initWithFrame:frame];
   101     [self initWithFrame:frame];
   102     [self setTitle:title forState:UIControlStateNormal];
   102     [self setTitle:title forState:UIControlStateNormal];
       
   103     [self applyBlackQuickStyle];
       
   104 
       
   105     return self;
       
   106 }
       
   107 
       
   108 - (void)applyBlackQuickStyle
       
   109 {
   103     [self setTitleColor:[UIColor whiteColor] forState:UIControlStateNormal];
   110     [self setTitleColor:[UIColor whiteColor] forState:UIControlStateNormal];
   104     [self setTitleColor:[UIColor grayColor] forState:UIControlStateHighlighted];
   111     [self setTitleColor:[UIColor grayColor] forState:UIControlStateHighlighted];
   105     self.titleLabel.font = [UIFont boldSystemFontOfSize:[UIFont labelFontSize]];
   112     self.titleLabel.font = [UIFont boldSystemFontOfSize:[UIFont labelFontSize]];
   106     self.backgroundColor = [UIColor blackColorTransparent];
   113     self.backgroundColor = [UIColor blackColorTransparent];
   107 
   114     
   108     [self.layer setBorderWidth:1];
   115     [self.layer setBorderWidth:1.0f];
   109     [self.layer setBorderColor:[[UIColor darkYellowColor] CGColor]];
   116     [self.layer setBorderColor:[[UIColor darkYellowColor] CGColor]];
   110     [self.layer setCornerRadius:9.0f];
   117     [self.layer setCornerRadius:9.0f];
   111     [self.layer setMasksToBounds:YES];
   118     [self.layer setMasksToBounds:YES];
       
   119 }
   112 
   120 
   113     return self;
   121 - (void)applyDarkBlueQuickStyle
       
   122 {
       
   123     [self setTitleColor:[UIColor darkYellowColor] forState:UIControlStateNormal];
       
   124     [self setTitleColor:[UIColor grayColor] forState:UIControlStateHighlighted];
       
   125     self.titleLabel.font = [UIFont boldSystemFontOfSize:[UIFont labelFontSize]];
       
   126     self.backgroundColor = [UIColor darkBlueColorTransparent];
       
   127     
       
   128     [self.layer setBorderWidth:2.0f];
       
   129     [self.layer setBorderColor:[[UIColor darkYellowColor] CGColor]];
       
   130     [self.layer setCornerRadius:9.0f];
       
   131     [self.layer setMasksToBounds:YES];
   114 }
   132 }
   115 
   133 
   116 @end
   134 @end
   117 
   135 
   118 
   136