--- a/project_files/HedgewarsMobile/Classes/StatsPageViewController.m Fri Dec 31 01:15:43 2010 +0100
+++ b/project_files/HedgewarsMobile/Classes/StatsPageViewController.m Fri Dec 31 02:52:55 2010 +0100
@@ -29,6 +29,31 @@
return rotationManager(interfaceOrientation);
}
+-(void) viewDidLoad {
+ if ([self.tableView respondsToSelector:@selector(setBackgroundView:)])
+ self.tableView.backgroundView = nil;
+
+ NSString *imgName;
+ if (IS_IPAD())
+ imgName = @"mediumBackground~ipad.png";
+ else
+ imgName = @"smallerBackground~iphone.png";
+
+ if ([self.tableView respondsToSelector:@selector(setBackgroundView:)]) {
+ UIImage *backgroundImage = [[UIImage alloc] initWithContentsOfFile:imgName];
+ UIImageView *background = [[UIImageView alloc] initWithImage:backgroundImage];
+ [backgroundImage release];
+ [self.tableView setBackgroundView:background];
+ [background release];
+ } else
+ self.view.backgroundColor = [UIColor blackColor];
+
+ self.tableView.separatorColor = UICOLOR_HW_YELLOW_BODER;
+ self.tableView.separatorStyle = UITableViewCellSeparatorStyleNone;
+
+ [super viewDidLoad];
+}
+
#pragma mark -
#pragma mark Table view data source
-(NSInteger) numberOfSectionsInTableView:(UITableView *)tableView {
@@ -54,15 +79,39 @@
cell.textLabel.textAlignment = UITextAlignmentCenter;
if (section == 0) {
cell.textLabel.text = [self.statsArray objectAtIndex:row];
+ cell.textLabel.textColor = UICOLOR_HW_YELLOW_TEXT;
} else if (section == 1) {
cell.textLabel.text = [self.statsArray objectAtIndex:row + 1];
+ cell.textLabel.textColor = UICOLOR_HW_YELLOW_TEXT;
} else {
cell.textLabel.text = NSLocalizedString(@"Done",@"");
+ cell.textLabel.textColor = [UIColor whiteColor];
}
+ cell.backgroundColor = [UIColor blackColor];
+ cell.selectionStyle = UITableViewCellSelectionStyleNone;
return cell;
}
+-(CGFloat) tableView:(UITableView *)tableView heightForHeaderInSection:(NSInteger)section {
+ return 160;
+}
+
+-(UIView *)tableView:(UITableView *)tableView viewForHeaderInSection:(NSInteger)section {
+ if (section == 0) {
+ UIView *header = [[UIView alloc] initWithFrame:CGRectMake(0, 0, self.tableView.frame.size.width, 160)];
+ UIImage *img = [[UIImage alloc] initWithContentsOfFile:@"smallerTitle.png"];
+ UIImageView *imgView = [[UIImageView alloc] initWithImage:img];
+ [img release];
+ imgView.center = CGPointMake(self.tableView.frame.size.height/2, 160/2);
+ [header addSubview:imgView];
+ [imgView release];
+
+ return [header autorelease];
+ } else
+ return nil;
+}
+
#pragma mark -
#pragma mark Table view delegate
-(void) tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
--- a/project_files/HedgewarsMobile/Hedgewars.xcodeproj/project.pbxproj Fri Dec 31 01:15:43 2010 +0100
+++ b/project_files/HedgewarsMobile/Hedgewars.xcodeproj/project.pbxproj Fri Dec 31 02:52:55 2010 +0100
@@ -118,6 +118,8 @@
6172FEEF1298D25D00D73365 /* mediumBackground~ipad.png in Resources */ = {isa = PBXBuildFile; fileRef = 6172FEEB1298D25D00D73365 /* mediumBackground~ipad.png */; };
6172FEF11298D25D00D73365 /* smallerBackground~ipad.png in Resources */ = {isa = PBXBuildFile; fileRef = 6172FEED1298D25D00D73365 /* smallerBackground~ipad.png */; };
6172FEF21298D25D00D73365 /* smallerBackground~iphone.png in Resources */ = {isa = PBXBuildFile; fileRef = 6172FEEE1298D25D00D73365 /* smallerBackground~iphone.png */; };
+ 6174F7C812CD62E300205D6F /* smallerTitle.png in Resources */ = {isa = PBXBuildFile; fileRef = 6174F7C612CD62E300205D6F /* smallerTitle.png */; };
+ 6174F7C912CD62E300205D6F /* smallerTitle@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 6174F7C712CD62E300205D6F /* smallerTitle@2x.png */; };
61798816114AA34C00BA94A9 /* hwengine.pas in Sources */ = {isa = PBXBuildFile; fileRef = 617987E7114AA34C00BA94A9 /* hwengine.pas */; };
61798818114AA34C00BA94A9 /* hwLibrary.pas in Sources */ = {isa = PBXBuildFile; fileRef = 617987E9114AA34C00BA94A9 /* hwLibrary.pas */; };
6179881B114AA34C00BA94A9 /* PascalExports.pas in Sources */ = {isa = PBXBuildFile; fileRef = 617987EC114AA34C00BA94A9 /* PascalExports.pas */; };
@@ -890,6 +892,8 @@
6172FEEC1298D25D00D73365 /* smallerBackground@2x~iphone.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = "smallerBackground@2x~iphone.png"; path = "Resources/Frontend/smallerBackground@2x~iphone.png"; sourceTree = "<group>"; };
6172FEED1298D25D00D73365 /* smallerBackground~ipad.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = "smallerBackground~ipad.png"; path = "Resources/Frontend/smallerBackground~ipad.png"; sourceTree = "<group>"; };
6172FEEE1298D25D00D73365 /* smallerBackground~iphone.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = "smallerBackground~iphone.png"; path = "Resources/Frontend/smallerBackground~iphone.png"; sourceTree = "<group>"; };
+ 6174F7C612CD62E300205D6F /* smallerTitle.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = smallerTitle.png; path = Resources/Frontend/smallerTitle.png; sourceTree = "<group>"; };
+ 6174F7C712CD62E300205D6F /* smallerTitle@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = "smallerTitle@2x.png"; path = "Resources/Frontend/smallerTitle@2x.png"; sourceTree = "<group>"; };
617987E4114AA34C00BA94A9 /* GSHandlers.inc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.pascal; name = GSHandlers.inc; path = ../../hedgewars/GSHandlers.inc; sourceTree = SOURCE_ROOT; };
617987E5114AA34C00BA94A9 /* HHHandlers.inc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.pascal; name = HHHandlers.inc; path = ../../hedgewars/HHHandlers.inc; sourceTree = SOURCE_ROOT; };
617987E7114AA34C00BA94A9 /* hwengine.pas */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.pascal; name = hwengine.pas; path = ../../hedgewars/hwengine.pas; sourceTree = SOURCE_ROOT; };
@@ -1499,6 +1503,8 @@
61EBA62811DFF2BC0048B68A /* title.png */,
618899811299516000D55FD6 /* title@2x.png */,
61889984129995B500D55FD6 /* title~ipad.png */,
+ 6174F7C612CD62E300205D6F /* smallerTitle.png */,
+ 6174F7C712CD62E300205D6F /* smallerTitle@2x.png */,
61F9040A11DF59370068B24D /* background.png */,
6172FED61298CF9800D73365 /* background@2x~iphone.png */,
6172FED71298CF9800D73365 /* background~iphone.png */,
@@ -2281,6 +2287,8 @@
61188C0712A6FE960026C5DA /* settingsButton@2x.png in Resources */,
61188C0812A6FE9A0026C5DA /* title@2x.png in Resources */,
61188C0912A6FE9C0026C5DA /* tw@2x.png in Resources */,
+ 6174F7C812CD62E300205D6F /* smallerTitle.png in Resources */,
+ 6174F7C912CD62E300205D6F /* smallerTitle@2x.png in Resources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
Binary file project_files/HedgewarsMobile/Resources/Frontend/smallerTitle.png has changed
Binary file project_files/HedgewarsMobile/Resources/Frontend/smallerTitle@2x.png has changed