project_files/HedgewarsMobile/Classes/SchemeWeaponConfigViewController.m
changeset 3983 aa24192417a8
parent 3971 5c82ee165ed5
child 4082 bfe14b38dad1
--- a/project_files/HedgewarsMobile/Classes/SchemeWeaponConfigViewController.m	Tue Oct 19 21:55:49 2010 +0200
+++ b/project_files/HedgewarsMobile/Classes/SchemeWeaponConfigViewController.m	Tue Oct 19 23:58:27 2010 +0200
@@ -20,7 +20,6 @@
 
 
 #import "SchemeWeaponConfigViewController.h"
-#import <QuartzCore/QuartzCore.h>
 #import "CommodityFunctions.h"
 #import "SDL_uikitappdelegate.h"
 
@@ -127,22 +126,14 @@
 }
 
 -(UIView *)tableView:(UITableView *)tableView viewForHeaderInSection:(NSInteger)section {
-    UILabel *theLabel = [[UILabel alloc] initWithFrame:CGRectMake(0, 0, self.view.frame.size.width * 80/100, 30)];
-    theLabel.backgroundColor = [UIColor blueColor];
+    CGRect frame = CGRectMake(0, 0, self.view.frame.size.width * 80/100, 30);
+    NSString *text;
     if (section == 0) 
-        theLabel.text = NSLocalizedString(@"Schemes",@"");
+        text = NSLocalizedString(@"Schemes",@"");
     else
-        theLabel.text = NSLocalizedString(@"Weapons",@"");
+        text = NSLocalizedString(@"Weapons",@"");
+    UILabel *theLabel = createBlueLabel(text, frame);
     theLabel.center = CGPointMake(self.view.frame.size.width/2, 20);
-    theLabel.textColor = UICOLOR_HW_YELLOW_TEXT;
-    theLabel.textAlignment = UITextAlignmentCenter;
-    theLabel.font = [UIFont boldSystemFontOfSize:[UIFont labelFontSize]*80/100];
-    theLabel.backgroundColor = UICOLOR_HW_DARKBLUE;
-    
-    [theLabel.layer setBorderWidth:1.5f];
-    [theLabel.layer setBorderColor:[UICOLOR_HW_YELLOW_BODER CGColor]];
-    [theLabel.layer setCornerRadius:8.0f];
-    [theLabel.layer setMasksToBounds:YES];
 
     UIView *theView = [[[UIView alloc] init] autorelease];
     [theView addSubview:theLabel];
@@ -150,16 +141,6 @@
     return theView;
 }
 
-/*
--(NSString *)tableView:(UITableView *)tableView titleForHeaderInSection:(NSInteger) section {
-    if (section == 0) {
-        return NSLocalizedString(@"Schemes",@"");
-    } else {
-        return NSLocalizedString(@"Weapons",@"");;
-    }
-}
-*/
-
 #pragma mark -
 #pragma mark Table view delegate
 -(void) tableView:(UITableView *)aTableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {