project_files/HedgewarsMobile/Classes/ExtraCategories.m
changeset 6711 76e96101a84f
parent 6700 e04da46ee43c
child 6832 fae8fd118da9
--- a/project_files/HedgewarsMobile/Classes/ExtraCategories.m	Sat Feb 18 19:07:19 2012 +0100
+++ b/project_files/HedgewarsMobile/Classes/ExtraCategories.m	Sat Feb 18 19:29:16 2012 +0100
@@ -96,9 +96,31 @@
 
 
 #pragma mark -
+@implementation UIButton (quickStyle)
+
+-(id) initWithFrame:(CGRect) frame andTitle:(NSString *)title {
+    [self initWithFrame:frame];
+    [self setTitle:title forState:UIControlStateNormal];
+    [self setTitleColor:[UIColor whiteColor] forState:UIControlStateNormal];
+    [self setTitleColor:[UIColor grayColor] forState:UIControlStateHighlighted];
+    self.titleLabel.font = [UIFont boldSystemFontOfSize:[UIFont labelFontSize]];
+    self.backgroundColor = [UIColor blackColorTransparent];
+
+    [self.layer setBorderWidth:1];
+    [self.layer setBorderColor:[[UIColor darkYellowColor] CGColor]];
+    [self.layer setCornerRadius:9.0f];
+    [self.layer setMasksToBounds:YES];
+
+    return self;
+}
+
+@end
+
+
+#pragma mark -
 @implementation UILabel (quickStyle)
 
--(UILabel *)initWithFrame:(CGRect)frame andTitle:(NSString *)title {
+-(id) initWithFrame:(CGRect)frame andTitle:(NSString *)title {
     return [self initWithFrame:frame
                       andTitle:title
                withBorderWidth:1.5f
@@ -106,7 +128,7 @@
            withBackgroundColor:[UIColor darkBlueColor]];
 }
 
--(UILabel *)initWithFrame:(CGRect)frame andTitle:(NSString *)title  withBorderWidth:(CGFloat) borderWidth {
+-(id) initWithFrame:(CGRect)frame andTitle:(NSString *)title withBorderWidth:(CGFloat) borderWidth {
     return [self initWithFrame:frame
                       andTitle:title
                withBorderWidth:borderWidth
@@ -114,8 +136,8 @@
            withBackgroundColor:[UIColor darkBlueColorTransparent]];
 }
 
--(UILabel *)initWithFrame:(CGRect)frame andTitle:(NSString *)title  withBorderWidth:(CGFloat) borderWidth
-          withBorderColor:(UIColor *)borderColor withBackgroundColor:(UIColor *)backColor{
+-(id) initWithFrame:(CGRect)frame andTitle:(NSString *)title withBorderWidth:(CGFloat) borderWidth
+          withBorderColor:(UIColor *)borderColor withBackgroundColor:(UIColor *)backColor {
     UILabel *theLabel = [self initWithFrame:frame];
     theLabel.backgroundColor = backColor;