# HG changeset patch # User koda # Date 1318117512 -7200 # Node ID 7a8da11a61440b559fa3a2f924bbb80a0dc06c73 # Parent 0741c0f0203ecd2bec7e3bd11be940542e51d020 refreshed the ipad interface with some white diff -r 0741c0f0203e -r 7a8da11a6144 project_files/HedgewarsMobile/Classes/GameConfigViewController.m --- a/project_files/HedgewarsMobile/Classes/GameConfigViewController.m Sun Oct 09 00:24:58 2011 +0200 +++ b/project_files/HedgewarsMobile/Classes/GameConfigViewController.m Sun Oct 09 01:45:12 2011 +0200 @@ -72,7 +72,7 @@ if (self.helpPage == nil) self.helpPage = [[HelpPageViewController alloc] initWithNibName:@"HelpPageLobbyViewController-iPad" bundle:nil]; self.helpPage.view.alpha = 0; - [self.view addSubview:helpPage.view]; + [self.view addSubview:self.helpPage.view]; [UIView beginAnimations:@"helplobby" context:NULL]; self.helpPage.view.alpha = 1; [UIView commitAnimations]; @@ -305,32 +305,20 @@ self.mapConfigViewController = [[MapConfigViewController alloc] initWithNibName:@"MapConfigViewController-iPad" bundle:nil]; UILabel *theLabel; - // left column - theLabel = [[UILabel alloc] initWithFrame:CGRectMake(0, 60, 320, 620) andTitle:nil withBorderWidth:2.7f]; - [self.mapConfigViewController.view addSubview:theLabel]; - releaseAndNil(theLabel); - // center column - theLabel = [[UILabel alloc] initWithFrame:CGRectMake(337, 187, 350, 505) andTitle:nil withBorderWidth:2.7f]; - [self.mapConfigViewController.view addSubview:theLabel]; - releaseAndNil(theLabel); - // right column - theLabel = [[UILabel alloc] initWithFrame:CGRectMake(704, 214, 320, 466) andTitle:nil withBorderWidth:2.7f]; - [self.mapConfigViewController.view addSubview:theLabel]; - releaseAndNil(theLabel); // top right column (map) theLabel = [[UILabel alloc] initWithFrame:CGRectMake(714, 14, 300, 190) andTitle:nil withBorderWidth:2.3f]; [self.mapConfigViewController.view addSubview:theLabel]; releaseAndNil(theLabel); // bottom left - theLabel = [[UILabel alloc] initWithFrame:CGRectMake(110, 714, 320, 40) andTitle:nil withBorderWidth:2.0f]; + theLabel = [[UILabel alloc] initWithFrame:CGRectMake(116, 714, 310, 40) andTitle:nil withBorderWidth:2.0f]; [self.mapConfigViewController.view addSubview:theLabel]; releaseAndNil(theLabel); // bottom right - theLabel = [[UILabel alloc] initWithFrame:CGRectMake(596, 714, 320, 40) + theLabel = [[UILabel alloc] initWithFrame:CGRectMake(598, 714, 310, 40) andTitle:NSLocalizedString(@" Max Hogs:",@"") withBorderWidth:2.0f]; theLabel.font = [UIFont italicSystemFontOfSize:[UIFont labelFontSize]]; - theLabel.textColor = [UIColor lightYellowColor]; + theLabel.textColor = [UIColor whiteColor]; theLabel.textAlignment = UITextAlignmentLeft; [self.mapConfigViewController.view addSubview:theLabel]; releaseAndNil(theLabel); @@ -348,9 +336,10 @@ if (self.schemeWeaponConfigViewController == nil) self.schemeWeaponConfigViewController = [[SchemeWeaponConfigViewController alloc] initWithStyle:UITableViewStyleGrouped]; [self.mapConfigViewController.view addSubview:schemeWeaponConfigViewController.view]; + self.mapConfigViewController.view.frame = CGRectMake(0, 0, screen.size.height, screen.size.width); - self.teamConfigViewController.view.frame = CGRectMake(348, 200, 328, 480); - self.schemeWeaponConfigViewController.view.frame = CGRectMake(10, 70, 300, 600); + self.schemeWeaponConfigViewController.view.frame = CGRectMake(0, 60, 320, 620); + self.teamConfigViewController.view.frame = CGRectMake(337, 187, 350, 505); self.mapConfigViewController.parentController = self; } else { diff -r 0741c0f0203e -r 7a8da11a6144 project_files/HedgewarsMobile/Classes/HWUtils.h --- a/project_files/HedgewarsMobile/Classes/HWUtils.h Sun Oct 09 00:24:58 2011 +0200 +++ b/project_files/HedgewarsMobile/Classes/HWUtils.h Sun Oct 09 01:45:12 2011 +0200 @@ -31,6 +31,13 @@ @end +@interface UITableView (extra) + +-(void) setBackgroundColorForAnyTable:(UIColor *)color; + +@end + + @interface UIColor (extra) +(UIColor *)darkYellowColor; diff -r 0741c0f0203e -r 7a8da11a6144 project_files/HedgewarsMobile/Classes/HWUtils.m --- a/project_files/HedgewarsMobile/Classes/HWUtils.m Sun Oct 09 00:24:58 2011 +0200 +++ b/project_files/HedgewarsMobile/Classes/HWUtils.m Sun Oct 09 01:45:12 2011 +0200 @@ -59,6 +59,20 @@ @end +@implementation UITableView (extra) + +-(void) setBackgroundColorForAnyTable:(UIColor *) color { + UIView *backView = [[UIView alloc] initWithFrame:self.frame]; + backView.backgroundColor = color; + self.backgroundView = backView; + [backView release]; + self.backgroundColor = [UIColor clearColor]; +} + +@end + + + @implementation UIColor (extra) +(UIColor *)darkYellowColor { diff -r 0741c0f0203e -r 7a8da11a6144 project_files/HedgewarsMobile/Classes/MapConfigViewController-iPad.xib --- a/project_files/HedgewarsMobile/Classes/MapConfigViewController-iPad.xib Sun Oct 09 00:24:58 2011 +0200 +++ b/project_files/HedgewarsMobile/Classes/MapConfigViewController-iPad.xib Sun Oct 09 01:45:12 2011 +0200 @@ -166,8 +166,8 @@ 16 - 2 - MC45NDExNzY1MzM3IDAuODE1Njg2MzQ1MSAwAA + 1 + MSAxIDEAA 1 @@ -191,8 +191,11 @@ 16 - 2 - MC45MjU0OTAyNjAxIDAuODAwMDAwMDcxNSAwAA + 3 + MQA + + 2 + 1 @@ -202,7 +205,7 @@ 292 - {{357, 19}, {309, 165}} + {{357, 17}, {309, 165}} NO NO @@ -215,7 +218,7 @@ 274 - {{714, 225}, {300, 445}} + {{704, 214}, {320, 466}} 3 @@ -225,11 +228,13 @@ YES IBIPadFramework YES + NO + 2 1 2 0 YES - 45 + 44 @@ -256,7 +261,7 @@ 292 - {{11, 693}, {64, 64}} + {{20, 693}, {64, 64}} NO IBIPadFramework @@ -277,7 +282,7 @@ 292 - {{955, 693}, {64, 64}} + {{940, 693}, {64, 64}} NO 2 @@ -583,12 +588,14 @@ YES MapConfigViewController UIResponder - {{288, 236}, {1024, 768}} + {{141, 288}, {1024, 768}} com.apple.InterfaceBuilder.IBCocoaTouchPlugin com.apple.InterfaceBuilder.IBCocoaTouchPlugin com.apple.InterfaceBuilder.IBCocoaTouchPlugin com.apple.InterfaceBuilder.IBCocoaTouchPlugin - + + P4AAAL+AAAAAAAAAxD+AAA + com.apple.InterfaceBuilder.IBCocoaTouchPlugin P4AAAL+AAABDsoAAwz8AAA @@ -631,7 +638,7 @@ - 120 + 122 @@ -778,11 +785,15 @@ UILabel - + IBProjectSource Classes/HWUtils.h + + UITableView + + YES diff -r 0741c0f0203e -r 7a8da11a6144 project_files/HedgewarsMobile/Classes/MapConfigViewController.m --- a/project_files/HedgewarsMobile/Classes/MapConfigViewController.m Sun Oct 09 00:24:58 2011 +0200 +++ b/project_files/HedgewarsMobile/Classes/MapConfigViewController.m Sun Oct 09 01:45:12 2011 +0200 @@ -20,6 +20,7 @@ #import "MapConfigViewController.h" +#import #import "SchemeWeaponConfigViewController.h" #import "GameConfigViewController.h" @@ -433,7 +434,6 @@ if (self.segmentedControl.selectedSegmentIndex == 1) { self.slider.enabled = NO; self.sizeLabel.text = NSLocalizedString(@"No filter",@""); - self.sizeLabel.textColor = [UIColor lightYellowColor]; } self.templateFilterCommand = @"e$template_filter 0"; @@ -442,10 +442,14 @@ self.staticMapCommand = @""; self.missionCommand = @""; - if ([self.tableView respondsToSelector:@selector(setBackgroundView:)]) - [self.tableView setBackgroundView:nil]; - self.tableView.backgroundColor = [UIColor clearColor]; - self.tableView.separatorColor = [UIColor darkYellowColor]; + if (IS_IPAD()) { + [self.tableView setBackgroundColorForAnyTable:[UIColor darkBlueColorTransparent]]; + self.tableView.layer.borderColor = [[UIColor darkYellowColor] CGColor]; + self.tableView.layer.borderWidth = 2.7f; + self.tableView.layer.cornerRadius = 8; + self.tableView.contentInset = UIEdgeInsetsMake(10, 0, 10, 0); + } + self.tableView.separatorColor = [UIColor whiteColor]; self.tableView.separatorStyle = UITableViewCellSeparatorStyleNone; } diff -r 0741c0f0203e -r 7a8da11a6144 project_files/HedgewarsMobile/Classes/SchemeWeaponConfigViewController.m --- a/project_files/HedgewarsMobile/Classes/SchemeWeaponConfigViewController.m Sun Oct 09 00:24:58 2011 +0200 +++ b/project_files/HedgewarsMobile/Classes/SchemeWeaponConfigViewController.m Sun Oct 09 01:45:12 2011 +0200 @@ -20,6 +20,7 @@ #import "SchemeWeaponConfigViewController.h" +#import #define LABEL_TAG 57423 @@ -107,21 +108,22 @@ CGSize screenSize = [[UIScreen mainScreen] bounds].size; self.view.frame = CGRectMake(0, 0, screenSize.height, screenSize.width - 44); - if ([self.tableView respondsToSelector:@selector(setBackgroundView:)]) { - if (IS_IPAD()) - [self.tableView setBackgroundView:nil]; - else { - UIImage *backgroundImage = [[UIImage alloc] initWithContentsOfFile:@"background~iphone.png"]; - UIImageView *background = [[UIImageView alloc] initWithImage:backgroundImage]; - [backgroundImage release]; - [self.tableView setBackgroundView:background]; - [background release]; - } + if (IS_IPAD()) { + [self.tableView setBackgroundColorForAnyTable:[UIColor darkBlueColorTransparent]]; + self.tableView.layer.borderColor = [[UIColor darkYellowColor] CGColor]; + self.tableView.layer.borderWidth = 2.7f; + self.tableView.layer.cornerRadius = 8; + self.tableView.contentInset = UIEdgeInsetsMake(5, 0, 5, 0); } else { - self.view.backgroundColor = [UIColor blackColor]; + UIImage *backgroundImage = [[UIImage alloc] initWithContentsOfFile:@"background~iphone.png"]; + UIImageView *background = [[UIImageView alloc] initWithImage:backgroundImage]; + [backgroundImage release]; + [self.tableView setBackgroundView:background]; + [background release]; } - self.tableView.separatorColor = [UIColor darkYellowColor]; + self.tableView.indicatorStyle = UIScrollViewIndicatorStyleWhite; + self.tableView.separatorColor = [UIColor whiteColor]; self.tableView.separatorStyle = UITableViewCellSeparatorStyleNone; } diff -r 0741c0f0203e -r 7a8da11a6144 project_files/HedgewarsMobile/Classes/TeamConfigViewController.m --- a/project_files/HedgewarsMobile/Classes/TeamConfigViewController.m Sun Oct 09 00:24:58 2011 +0200 +++ b/project_files/HedgewarsMobile/Classes/TeamConfigViewController.m Sun Oct 09 01:45:12 2011 +0200 @@ -20,6 +20,7 @@ #import "TeamConfigViewController.h" +#import #import "SquareButtonView.h" @@ -34,20 +35,22 @@ CGSize screenSize = [[UIScreen mainScreen] bounds].size; self.view.frame = CGRectMake(0, 0, screenSize.height, screenSize.width - 44); - if ([self.tableView respondsToSelector:@selector(setBackgroundView:)]) { - if (IS_IPAD()) - [self.tableView setBackgroundView:nil]; - else { - UIImage *backgroundImage = [[UIImage alloc] initWithContentsOfFile:@"background~iphone.png"]; - UIImageView *background = [[UIImageView alloc] initWithImage:backgroundImage]; - [backgroundImage release]; - [self.tableView setBackgroundView:background]; - [background release]; - } - } else - self.view.backgroundColor = [UIColor blackColor]; + if (IS_IPAD()) { + [self.tableView setBackgroundColorForAnyTable:[UIColor darkBlueColorTransparent]]; + self.tableView.layer.borderColor = [[UIColor darkYellowColor] CGColor]; + self.tableView.layer.borderWidth = 2.7f; + self.tableView.layer.cornerRadius = 8; + self.tableView.contentInset = UIEdgeInsetsMake(10, 0, 10, 0); + } else { + UIImage *backgroundImage = [[UIImage alloc] initWithContentsOfFile:@"background~iphone.png"]; + UIImageView *background = [[UIImageView alloc] initWithImage:backgroundImage]; + [backgroundImage release]; + [self.tableView setBackgroundView:background]; + [background release]; + } - self.tableView.separatorColor = [UIColor darkYellowColor]; + self.tableView.indicatorStyle = UIScrollViewIndicatorStyleWhite; + self.tableView.separatorColor = [UIColor whiteColor]; self.tableView.separatorStyle = UITableViewCellSeparatorStyleNone; } @@ -200,7 +203,7 @@ } -(CGFloat) tableView:(UITableView *)tableView heightForHeaderInSection:(NSInteger)section { - return 40.0; + return 45.0; } -(UIView *)tableView:(UITableView *)tableView viewForHeaderInSection:(NSInteger)section { diff -r 0741c0f0203e -r 7a8da11a6144 project_files/HedgewarsMobile/Resources/Frontend/helpButton.png Binary file project_files/HedgewarsMobile/Resources/Frontend/helpButton.png has changed