project_files/HedgewarsMobile/Classes/TeamConfigViewController.m
changeset 3983 aa24192417a8
parent 3971 5c82ee165ed5
child 4082 bfe14b38dad1
equal deleted inserted replaced
3982:86c3a6e8e265 3983:aa24192417a8
    18  * File created on 20/04/2010.
    18  * File created on 20/04/2010.
    19  */
    19  */
    20 
    20 
    21 
    21 
    22 #import "TeamConfigViewController.h"
    22 #import "TeamConfigViewController.h"
    23 #import <QuartzCore/QuartzCore.h>
       
    24 #import "CommodityFunctions.h"
    23 #import "CommodityFunctions.h"
    25 #import "HogButtonView.h"
    24 #import "HogButtonView.h"
    26 #import "SquareButtonView.h"
    25 #import "SquareButtonView.h"
    27 
    26 
    28 @implementation TeamConfigViewController
    27 @implementation TeamConfigViewController
   170 -(CGFloat) tableView:(UITableView *)tableView heightForHeaderInSection:(NSInteger)section {
   169 -(CGFloat) tableView:(UITableView *)tableView heightForHeaderInSection:(NSInteger)section {
   171     return 40.0;
   170     return 40.0;
   172 }
   171 }
   173 
   172 
   174 -(UIView *)tableView:(UITableView *)tableView viewForHeaderInSection:(NSInteger)section {
   173 -(UIView *)tableView:(UITableView *)tableView viewForHeaderInSection:(NSInteger)section {
   175     UILabel *theLabel = [[UILabel alloc] initWithFrame:CGRectMake(0, 0, self.view.frame.size.width * 80/100, 30)];
   174     CGRect frame = CGRectMake(0, 0, self.view.frame.size.width * 80/100, 30);
   176     theLabel.backgroundColor = [UIColor blueColor];
   175     NSString *text;
   177     if (section == 0) 
   176     if (section == 0) 
   178         theLabel.text = NSLocalizedString(@"Playing Teams",@"");
   177         text = NSLocalizedString(@"Playing Teams",@"");
   179     else
   178     else
   180         theLabel.text = NSLocalizedString(@"Available Teams",@"");
   179         text = NSLocalizedString(@"Available Teams",@"");
       
   180     UILabel *theLabel = createBlueLabel(text, frame);
   181     theLabel.center = CGPointMake(self.view.frame.size.width/2, 20);
   181     theLabel.center = CGPointMake(self.view.frame.size.width/2, 20);
   182     theLabel.textColor = UICOLOR_HW_YELLOW_TEXT;
       
   183     theLabel.textAlignment = UITextAlignmentCenter;
       
   184     theLabel.font = [UIFont boldSystemFontOfSize:[UIFont labelFontSize]*80/100];
       
   185     theLabel.backgroundColor = UICOLOR_HW_DARKBLUE;
       
   186     
       
   187     [theLabel.layer setBorderWidth:1.5f];
       
   188     [theLabel.layer setBorderColor:[UICOLOR_HW_YELLOW_BODER CGColor]];
       
   189     [theLabel.layer setCornerRadius:8.0f];
       
   190     [theLabel.layer setMasksToBounds:YES];
       
   191 
   182 
   192     UIView *theView = [[[UIView alloc] init] autorelease];
   183     UIView *theView = [[[UIView alloc] init] autorelease];
   193     [theView addSubview:theLabel];
   184     [theView addSubview:theLabel];
   194     [theLabel release];
   185     [theLabel release];
   195     return theView;
   186     return theView;