# HG changeset patch
# User koda
# Date 1319763991 -7200
# Node ID c193881389c1e0e3c963617d6e47e033d6c852a5
# Parent 999215ca87d7f4fa1e5837e84663ee06352c5088
restore game config on iphone
diff -r 999215ca87d7 -r c193881389c1 hedgewars/hwengine.pas
--- a/hedgewars/hwengine.pas Thu Oct 27 22:52:22 2011 +0200
+++ b/hedgewars/hwengine.pas Fri Oct 28 03:06:31 2011 +0200
@@ -187,9 +187,12 @@
end
else if event.window.event = SDL_WINDOWEVENT_RESIZED then
begin
+ // way too broken right now
+ (*
cNewScreenWidth:= max(2 * (event.window.data1 div 2), cMinScreenWidth);
cNewScreenHeight:= max(2 * (event.window.data2 div 2), cMinScreenHeight);
cScreenResizeDelay:= RealTicks+500;
+ *)
end;
{$ELSE}
SDL_KEYDOWN: if GameState = gsChat then
diff -r 999215ca87d7 -r c193881389c1 project_files/HedgewarsMobile/Classes/GameConfigViewController-iPad.xib
--- a/project_files/HedgewarsMobile/Classes/GameConfigViewController-iPad.xib Thu Oct 27 22:52:22 2011 +0200
+++ b/project_files/HedgewarsMobile/Classes/GameConfigViewController-iPad.xib Fri Oct 28 03:06:31 2011 +0200
@@ -12,7 +12,6 @@
{480, 320}
@@ -151,6 +178,29 @@
IBCocoaTouchFramework
+
+ MapConfigViewController-iPhone
+
+
+ 3
+
+ IBCocoaTouchFramework
+ YES
+
+
+
+ 1
+
+
+ IBCocoaTouchFramework
+ YES
+
+
+
+
+ IBCocoaTouchFramework
+ YES
+
@@ -188,6 +238,46 @@
29
+
+
+ mapConfigViewController
+
+
+
+ 33
+
+
+
+ teamConfigViewController
+
+
+
+ 34
+
+
+
+ schemeWeaponConfigViewController
+
+
+
+ 35
+
+
+
+ view
+
+
+
+ 42
+
+
+
+ view
+
+
+
+ 43
+
@@ -215,6 +305,8 @@
YES
+
+
@@ -265,6 +357,33 @@
+
+ 30
+
+
+
+
+ 31
+
+
+
+
+ 32
+
+
+
+
+ 40
+
+
+ TeamConfigViewController View
+
+
+ 41
+
+
+ SchemeWeaponConfigViewController View
+
@@ -282,6 +401,19 @@
2.IBPluginDependency
20.IBPluginDependency
22.IBPluginDependency
+ 30.CustomClassName
+ 30.IBEditorWindowLastContentRect
+ 30.IBPluginDependency
+ 31.CustomClassName
+ 31.IBEditorWindowLastContentRect
+ 31.IBPluginDependency
+ 32.CustomClassName
+ 32.IBEditorWindowLastContentRect
+ 32.IBPluginDependency
+ 40.IBPluginDependency
+ 40.IBViewBoundsToFrameTransform
+ 41.IBPluginDependency
+ 41.IBViewBoundsToFrameTransform
YES
@@ -294,10 +426,27 @@
com.apple.InterfaceBuilder.IBCocoaTouchPlugin
com.apple.InterfaceBuilder.IBCocoaTouchPlugin
com.apple.InterfaceBuilder.IBCocoaTouchPlugin
- {{131, 321}, {480, 320}}
+ {{40, 217}, {480, 320}}
com.apple.InterfaceBuilder.IBCocoaTouchPlugin
com.apple.InterfaceBuilder.IBCocoaTouchPlugin
com.apple.InterfaceBuilder.IBCocoaTouchPlugin
+ MapConfigViewController
+ {{0, 825}, {480, 320}}
+ com.apple.InterfaceBuilder.IBCocoaTouchPlugin
+ TeamConfigViewController
+ {{21, 802}, {480, 320}}
+ com.apple.InterfaceBuilder.IBCocoaTouchPlugin
+ SchemeWeaponConfigViewController
+ {{42, 779}, {480, 320}}
+ com.apple.InterfaceBuilder.IBCocoaTouchPlugin
+ com.apple.InterfaceBuilder.IBCocoaTouchPlugin
+
+ P4AAAL+AAAAAAAAAw5QAAA
+
+ com.apple.InterfaceBuilder.IBCocoaTouchPlugin
+
+ P4AAAL+AAAAAAAAAw5QAAA
+
@@ -316,7 +465,7 @@
- 29
+ 45
@@ -356,11 +505,210 @@
+
+ YES
+
+ YES
+ mapConfigViewController
+ schemeWeaponConfigViewController
+ teamConfigViewController
+
+
+ YES
+ MapConfigViewController
+ SchemeWeaponConfigViewController
+ TeamConfigViewController
+
+
+
+ YES
+
+ YES
+ mapConfigViewController
+ schemeWeaponConfigViewController
+ teamConfigViewController
+
+
+ YES
+
+ mapConfigViewController
+ MapConfigViewController
+
+
+ schemeWeaponConfigViewController
+ SchemeWeaponConfigViewController
+
+
+ teamConfigViewController
+ TeamConfigViewController
+
+
+
IBProjectSource
Classes/GameConfigViewController.h
+
+ MapConfigViewController
+ UIViewController
+
+ YES
+
+ YES
+ mapButtonPressed:
+ segmentedControlChanged:
+ sliderChanged:
+ sliderEndedChanging:
+
+
+ YES
+ id
+ id
+ id
+ id
+
+
+
+ YES
+
+ YES
+ mapButtonPressed:
+ segmentedControlChanged:
+ sliderChanged:
+ sliderEndedChanging:
+
+
+ YES
+
+ mapButtonPressed:
+ id
+
+
+ segmentedControlChanged:
+ id
+
+
+ sliderChanged:
+ id
+
+
+ sliderEndedChanging:
+ id
+
+
+
+
+ YES
+
+ YES
+ maxLabel
+ previewButton
+ segmentedControl
+ sizeLabel
+ slider
+ tableView
+
+
+ YES
+ UILabel
+ MapPreviewButtonView
+ UISegmentedControl
+ UILabel
+ UISlider
+ UITableView
+
+
+
+ YES
+
+ YES
+ maxLabel
+ previewButton
+ segmentedControl
+ sizeLabel
+ slider
+ tableView
+
+
+ YES
+
+ maxLabel
+ UILabel
+
+
+ previewButton
+ MapPreviewButtonView
+
+
+ segmentedControl
+ UISegmentedControl
+
+
+ sizeLabel
+ UILabel
+
+
+ slider
+ UISlider
+
+
+ tableView
+ UITableView
+
+
+
+
+ IBProjectSource
+ Classes/MapConfigViewController.h
+
+
+
+ MapPreviewButtonView
+ UIButton
+
+ delegate
+ id
+
+
+ delegate
+
+ delegate
+ id
+
+
+
+ IBProjectSource
+ Classes/MapPreviewButtonView.h
+
+
+
+ SchemeWeaponConfigViewController
+ UIViewController
+
+ IBProjectSource
+ Classes/SchemeWeaponConfigViewController.h
+
+
+
+ TeamConfigViewController
+ UIViewController
+
+ IBProjectSource
+ Classes/TeamConfigViewController.h
+
+
+
+ UILabel
+
+ IBProjectSource
+ ExtraCategories.h
+
+
+
+ UITableView
+
+
YES
@@ -486,6 +834,14 @@
+ UIButton
+ UIControl
+
+ IBFrameworkSource
+ UIKit.framework/Headers/UIButton.h
+
+
+
UIControl
UIView
@@ -494,11 +850,27 @@
+ UILabel
+ UIView
+
+ IBFrameworkSource
+ UIKit.framework/Headers/UILabel.h
+
+
+
UIResponder
NSObject
+ UIScrollView
+ UIView
+
+ IBFrameworkSource
+ UIKit.framework/Headers/UIScrollView.h
+
+
+
UISearchBar
UIView
@@ -523,6 +895,22 @@
+ UISlider
+ UIControl
+
+ IBFrameworkSource
+ UIKit.framework/Headers/UISlider.h
+
+
+
+ UITableView
+ UIScrollView
+
+ IBFrameworkSource
+ UIKit.framework/Headers/UITableView.h
+
+
+
UIToolbar
UIView
diff -r 999215ca87d7 -r c193881389c1 project_files/HedgewarsMobile/Classes/GameConfigViewController.m
--- a/project_files/HedgewarsMobile/Classes/GameConfigViewController.m Thu Oct 27 22:52:22 2011 +0200
+++ b/project_files/HedgewarsMobile/Classes/GameConfigViewController.m Fri Oct 28 03:06:31 2011 +0200
@@ -35,19 +35,6 @@
return rotationManager(interfaceOrientation);
}
-/*
--(MapConfigViewController *)mapConfigViewController {
- if (mapConfigViewController == nil) {
- NSString *xib = IS_IPAD() ? @"MapConfigViewController-iPad" : @"MapConfigViewController-iPhone";
- MapConfigViewController *mcvc = [[MapConfigViewController alloc] initWithNibName:xib bundle:nil];
- [self.view addSubview:mcvc.view];
- self.mapConfigViewController = mcvc;
- [mcvc release];
- }
- return mapConfigViewController;
-}
-*/
-
-(IBAction) buttonPressed:(id) sender {
UIButton *theButton = (UIButton *)sender;
@@ -97,7 +84,7 @@
}
-(IBAction) segmentPressed:(id) sender {
-/*
+
UISegmentedControl *theSegment = (UISegmentedControl *)sender;
[AudioManagerController playSelectSound];
@@ -113,10 +100,6 @@
[self.view bringSubviewToFront:self.teamConfigViewController.view];
break;
case 2:
- if (schemeWeaponConfigViewController == nil) {
- schemeWeaponConfigViewController = [[SchemeWeaponConfigViewController alloc] initWithStyle:UITableViewStyleGrouped];
- [self.view addSubview:schemeWeaponConfigViewController.view];
- }
// this message is compulsory otherwise the table won't be loaded at all
[schemeWeaponConfigViewController viewWillAppear:NO];
[self.view bringSubviewToFront:schemeWeaponConfigViewController.view];
@@ -134,7 +117,7 @@
DLog(@"Nope");
break;
}
-*/
+
}
-(BOOL) isEverythingSet {
@@ -324,12 +307,7 @@
// as this is loaded from a NIB we need to set its size and position
self.mapConfigViewController.view.frame = CGRectMake(704, 0, 320, 680);
} else {
- // this is the visible controller
- if (self.mapConfigViewController == nil)
- self.mapConfigViewController = [[MapConfigViewController alloc] initWithNibName:@"MapConfigViewController-iPhone" bundle:nil];
- // this must be loaded & added in order to auto set default scheme and ammo
- self.schemeWeaponConfigViewController = [[SchemeWeaponConfigViewController alloc] initWithStyle:UITableViewStyleGrouped];
- [self.view addSubview:self.schemeWeaponConfigViewController.view];
+ self.mapConfigViewController.view.frame = CGRectMake(0, 0, screen.size.height, screen.size.width-44);
}
[self.view addSubview:self.mapConfigViewController.view];
diff -r 999215ca87d7 -r c193881389c1 project_files/HedgewarsMobile/Classes/MapConfigViewController-iPhone.xib
--- a/project_files/HedgewarsMobile/Classes/MapConfigViewController-iPhone.xib Thu Oct 27 22:52:22 2011 +0200
+++ b/project_files/HedgewarsMobile/Classes/MapConfigViewController-iPhone.xib Fri Oct 28 03:06:31 2011 +0200
@@ -146,14 +146,14 @@
292
- {{58, 221}, {48, 35}}
+ {{9, 221}, {97, 35}}
NO
YES
7
NO
IBCocoaTouchFramework
- ...
+ Loading...
Helvetica-Bold
17
@@ -184,7 +184,7 @@
22
16
-
+
2
MC45NDExNzY1MzM3IDAuODE1Njg2MzQ1MSAwAA
@@ -215,28 +215,6 @@
10
10
-
-
- 292
- {{-9, 225}, {92, 27}}
-
- NO
- YES
- 7
- NO
- IBCocoaTouchFramework
- Max
-
- Helvetica-BoldOblique
- 18
- 16
-
-
-
- 1
- 10
- 1
-
{480, 276}
@@ -389,7 +367,6 @@
-
@@ -420,11 +397,6 @@
- 11
-
-
-
-
17
@@ -441,8 +413,8 @@
- 36
-
+ 11
+
@@ -463,8 +435,6 @@
25.IBViewBoundsToFrameTransform
35.IBPluginDependency
35.IBViewBoundsToFrameTransform
- 36.IBPluginDependency
- 36.IBViewBoundsToFrameTransform
7.IBPluginDependency
7.IBViewBoundsToFrameTransform
8.IBPluginDependency
@@ -496,17 +466,13 @@
com.apple.InterfaceBuilder.IBCocoaTouchPlugin
- P4AAAL+AAABBMAAAw2gAAA
-
- com.apple.InterfaceBuilder.IBCocoaTouchPlugin
-
P4AAAL+AAABBUAAAwigAAA
com.apple.InterfaceBuilder.IBCocoaTouchPlugin
MapPreviewButtonView
com.apple.InterfaceBuilder.IBCocoaTouchPlugin
- P4AAAL+AAABBUAAAwxIAAA
+ P4AAAL+AAABBgAAAwzgAAA
@@ -538,7 +504,6 @@
YES
YES
- buttonPressed:
mapButtonPressed:
segmentedControlChanged:
sliderChanged:
@@ -550,14 +515,12 @@
id
id
id
- id
YES
YES
- buttonPressed:
mapButtonPressed:
segmentedControlChanged:
sliderChanged:
@@ -566,10 +529,6 @@
YES
- buttonPressed:
- id
-
-
mapButtonPressed:
id
@@ -673,14 +632,14 @@
UILabel
-
+
IBProjectSource
- Classes/HWUtils.h
+ ExtraCategories.h
UITableView
-
+
diff -r 999215ca87d7 -r c193881389c1 project_files/HedgewarsMobile/Classes/MapPreviewButtonView.m
--- a/project_files/HedgewarsMobile/Classes/MapPreviewButtonView.m Thu Oct 27 22:52:22 2011 +0200
+++ b/project_files/HedgewarsMobile/Classes/MapPreviewButtonView.m Fri Oct 28 03:06:31 2011 +0200
@@ -209,6 +209,8 @@
-(void) updatePreviewWithFile:(NSString *)filePath {
UIImage *image = [[UIImage alloc] initWithContentsOfFile:filePath];
[self setImageRounded:image forState:UIControlStateNormal];
+ self.backgroundColor = [UIColor whiteColor];
+ self.layer.cornerRadius = 12;
[image release];
}
diff -r 999215ca87d7 -r c193881389c1 project_files/HedgewarsMobile/Classes/TeamConfigViewController.m
--- a/project_files/HedgewarsMobile/Classes/TeamConfigViewController.m Thu Oct 27 22:52:22 2011 +0200
+++ b/project_files/HedgewarsMobile/Classes/TeamConfigViewController.m Fri Oct 28 03:06:31 2011 +0200
@@ -34,10 +34,6 @@
#pragma mark -
#pragma mark View lifecycle
-(void) viewDidLoad {
-/*
- CGSize screenSize = [[UIScreen mainScreen] bounds].size;
- self.view.frame = CGRectMake(0, 0, screenSize.height, screenSize.width - 44);
-*/
UITableView *aTableView = [[UITableView alloc] initWithFrame:CGRectMake(0, 0, self.view.frame.size.width, self.view.frame.size.height)
style:UITableViewStyleGrouped];
aTableView.delegate = self;