# HG changeset patch
# User koda
# Date 1332890376 -7200
# Node ID d2df090453aa717d67d7112aa73bf2eba49af802
# Parent 60b039d88dab77c2ce1368f2266e3307cab89c1d
ios: prevent an horrible hack for the in-game help pages; they would actually need a serious refactoring to allow localisation and rotation support
diff -r 60b039d88dab -r d2df090453aa project_files/HedgewarsMobile/Classes/GameConfigViewController.h
--- a/project_files/HedgewarsMobile/Classes/GameConfigViewController.h Wed Mar 28 00:42:57 2012 +0200
+++ b/project_files/HedgewarsMobile/Classes/GameConfigViewController.h Wed Mar 28 01:19:36 2012 +0200
@@ -24,7 +24,7 @@
@class SchemeWeaponConfigViewController;
@class TeamConfigViewController;
@class MapConfigViewController;
-@class HelpPageViewController;
+@class HelpPageLobbyViewController;
@interface GameConfigViewController : UIViewController {
UIView *imgContainer;
@@ -34,7 +34,7 @@
SchemeWeaponConfigViewController *schemeWeaponConfigViewController;
TeamConfigViewController *teamConfigViewController;
MapConfigViewController *mapConfigViewController;
- HelpPageViewController *helpPage;
+ HelpPageLobbyViewController *helpPage;
}
@property (retain) UIView *imgContainer;
@@ -43,7 +43,7 @@
@property (nonatomic,retain) IBOutlet SchemeWeaponConfigViewController *schemeWeaponConfigViewController;
@property (nonatomic,retain) IBOutlet TeamConfigViewController *teamConfigViewController;
@property (nonatomic,retain) IBOutlet MapConfigViewController *mapConfigViewController;
-@property (nonatomic,retain) HelpPageViewController *helpPage;
+@property (nonatomic,retain) HelpPageLobbyViewController *helpPage;
-(IBAction) buttonPressed:(id) sender;
-(IBAction) segmentPressed:(id) sender;
diff -r 60b039d88dab -r d2df090453aa project_files/HedgewarsMobile/Classes/GameConfigViewController.m
--- a/project_files/HedgewarsMobile/Classes/GameConfigViewController.m Wed Mar 28 00:42:57 2012 +0200
+++ b/project_files/HedgewarsMobile/Classes/GameConfigViewController.m Wed Mar 28 01:19:36 2012 +0200
@@ -23,7 +23,7 @@
#import "MapConfigViewController.h"
#import "TeamConfigViewController.h"
#import "SchemeWeaponConfigViewController.h"
-#import "HelpPageViewController.h"
+#import "HelpPageLobbyViewController.h"
#import "GameInterfaceBridge.h"
@implementation GameConfigViewController
@@ -70,7 +70,7 @@
case 2:
[AudioManagerController playClickSound];
if (self.helpPage == nil)
- self.helpPage = [[HelpPageViewController alloc] initWithNibName:@"HelpPageLobbyViewController-iPad" bundle:nil];
+ self.helpPage = [[HelpPageLobbyViewController alloc] initWithNibName:@"HelpPageLobbyViewController-iPad" bundle:nil];
self.helpPage.view.alpha = 0;
[self.view addSubview:self.helpPage.view];
[UIView beginAnimations:@"helplobby" context:NULL];
@@ -106,7 +106,7 @@
break;
case 3:
if (helpPage == nil) {
- helpPage = [[HelpPageViewController alloc] initWithNibName:@"HelpPageLobbyViewController-iPhone" bundle:nil];
+ helpPage = [[HelpPageLobbyViewController alloc] initWithNibName:@"HelpPageLobbyViewController-iPhone" bundle:nil];
[self.view addSubview:helpPage.view];
}
// this message is compulsory otherwise the table won't be loaded at all
diff -r 60b039d88dab -r d2df090453aa project_files/HedgewarsMobile/Classes/HelpPageInGameViewController-iPad.xib
--- a/project_files/HedgewarsMobile/Classes/HelpPageInGameViewController-iPad.xib Wed Mar 28 00:42:57 2012 +0200
+++ b/project_files/HedgewarsMobile/Classes/HelpPageInGameViewController-iPad.xib Wed Mar 28 01:19:36 2012 +0200
@@ -1,14 +1,14 @@
- 1024
- 10F569
- 788
- 1038.29
+ 1056
+ 10K549
+ 823
+ 1038.36
461.00
@@ -788,6 +806,14 @@
+ UIScrollView
+ UIView
+
+ IBFrameworkSource
+ UIKit.framework/Headers/UIScrollView.h
+
+
+
UISearchBar
UIView
@@ -807,6 +833,13 @@
UIView
IBFrameworkSource
+ UIKit.framework/Headers/UIPrintFormatter.h
+
+
+
+ UIView
+
+ IBFrameworkSource
UIKit.framework/Headers/UITextField.h
@@ -860,7 +893,7 @@
IBIPadFramework
com.apple.InterfaceBuilder.CocoaTouchPlugin.iPhoneOS
-
+
com.apple.InterfaceBuilder.CocoaTouchPlugin.InterfaceBuilder3
@@ -884,6 +917,6 @@
{308, 144}
- 117
+ 132
diff -r 60b039d88dab -r d2df090453aa project_files/HedgewarsMobile/Classes/HelpPageInGameViewController-iPhone.xib
--- a/project_files/HedgewarsMobile/Classes/HelpPageInGameViewController-iPhone.xib Wed Mar 28 00:42:57 2012 +0200
+++ b/project_files/HedgewarsMobile/Classes/HelpPageInGameViewController-iPhone.xib Wed Mar 28 01:19:36 2012 +0200
@@ -2,9 +2,9 @@
1056
- 10H574
+ 10K549
823
- 1038.35
+ 1038.36
461.00
com.apple.InterfaceBuilder.IBCocoaTouchPlugin
@@ -627,7 +627,7 @@
YES
- HelpPageViewController
+ HelpPageInGameViewController
UIResponder
com.apple.InterfaceBuilder.IBCocoaTouchPlugin
@@ -733,7 +733,7 @@
YES
- HelpPageViewController
+ HelpPageInGameViewController
UIViewController
dismiss
@@ -759,7 +759,14 @@
IBProjectSource
- Classes/HelpPageViewController.h
+ Classes/HelpPageInGameViewController.h
+
+
+
+ UILabel
+
+ IBProjectSource
+ Classes/ExtraCategories.h
diff -r 60b039d88dab -r d2df090453aa project_files/HedgewarsMobile/Classes/HelpPageInGameViewController.h
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/project_files/HedgewarsMobile/Classes/HelpPageInGameViewController.h Wed Mar 28 01:19:36 2012 +0200
@@ -0,0 +1,33 @@
+/*
+ * Hedgewars-iOS, a Hedgewars port for iOS devices
+ * Copyright (c) 2009-2012 Vittorio Giovara
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; version 2 of the License
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ *
+ * File created on 30/08/2010.
+ */
+
+
+#import
+
+
+@interface HelpPageInGameViewController : UIViewController {
+ UIScrollView *scrollView;
+}
+
+@property (nonatomic, retain) IBOutlet UIScrollView *scrollView;
+
+-(IBAction) dismiss;
+
+@end
diff -r 60b039d88dab -r d2df090453aa project_files/HedgewarsMobile/Classes/HelpPageInGameViewController.m
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/project_files/HedgewarsMobile/Classes/HelpPageInGameViewController.m Wed Mar 28 01:19:36 2012 +0200
@@ -0,0 +1,66 @@
+/*
+ * Hedgewars-iOS, a Hedgewars port for iOS devices
+ * Copyright (c) 2009-2012 Vittorio Giovara
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; version 2 of the License
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ *
+ * File created on 30/08/2010.
+ */
+
+
+#import "HelpPageInGameViewController.h"
+
+
+@implementation HelpPageInGameViewController
+@synthesize scrollView;
+
+-(BOOL) shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation) interfaceOrientation {
+ return rotationManager(interfaceOrientation);
+}
+
+-(void) didReceiveMemoryWarning {
+ [super didReceiveMemoryWarning];
+ self.scrollView = nil;
+}
+
+// on iPhone the XIBs contain UIScrollView
+-(void) viewDidLoad {
+ if (IS_IPAD() == NO) {
+ scrollView.contentSize = CGSizeMake(480,470);
+ scrollView.maximumZoomScale = 4.0;
+ scrollView.minimumZoomScale = 0.75;
+ scrollView.clipsToBounds = YES;
+ scrollView.delegate = self;
+ }
+ [super viewDidLoad];
+}
+
+-(void) viewDidUnload {
+ [super viewDidUnload];
+ self.scrollView = nil;
+}
+
+-(void) dealloc {
+ releaseAndNil(scrollView);
+ [super dealloc];
+}
+
+-(IBAction) dismiss {
+ [UIView beginAnimations:@"dismiss help" context:NULL];
+ self.view.alpha = 0;
+ [UIView commitAnimations];
+ [self.view performSelector:@selector(removeFromSuperview) withObject:nil afterDelay:1];
+}
+
+@end
diff -r 60b039d88dab -r d2df090453aa project_files/HedgewarsMobile/Classes/HelpPageLobbyViewController-iPad.xib
--- a/project_files/HedgewarsMobile/Classes/HelpPageLobbyViewController-iPad.xib Wed Mar 28 00:42:57 2012 +0200
+++ b/project_files/HedgewarsMobile/Classes/HelpPageLobbyViewController-iPad.xib Wed Mar 28 01:19:36 2012 +0200
@@ -1,14 +1,14 @@
- 1024
- 10F569
- 804
- 1038.29
+ 1056
+ 10K549
+ 823
+ 1038.36
461.00
com.apple.InterfaceBuilder.IBCocoaTouchPlugin
- 123
+ 132
YES
@@ -37,7 +37,7 @@
IBIPadFramework
-
+
292
YES
@@ -46,7 +46,6 @@
292
{{742, 389}, {240, 102}}
-
NO
NO
IBIPadFramework
@@ -60,7 +59,6 @@
292
{{753, 408}, {109, 22}}
-
NO
YES
7
@@ -85,7 +83,6 @@
292
{{753, 425}, {218, 66}}
-
NO
YES
7
@@ -108,7 +105,6 @@
292
{{653, 202}, {240, 146}}
-
NO
NO
IBIPadFramework
@@ -119,7 +115,6 @@
292
{{664, 223}, {109, 22}}
-
NO
YES
7
@@ -137,7 +132,6 @@
292
{{664, 244}, {218, 99}}
-
NO
YES
7
@@ -156,7 +150,6 @@
292
{{494, 20}, {240, 101}}
-
NO
NO
IBIPadFramework
@@ -170,7 +163,6 @@
292
{{502, 25}, {109, 22}}
-
NO
YES
7
@@ -188,7 +180,6 @@
292
{{502, 46}, {218, 65}}
-
NO
YES
7
@@ -207,7 +198,6 @@
292
{{391, 389}, {242, 171}}
-
NO
NO
IBIPadFramework
@@ -218,7 +208,6 @@
292
{{401, 413}, {109, 22}}
-
NO
YES
7
@@ -236,7 +225,6 @@
292
{{400, 434}, {232, 120}}
-
NO
YES
7
@@ -255,7 +243,6 @@
292
{{142, 125}, {240, 104}}
-
NO
NO
IBIPadFramework
@@ -269,7 +256,6 @@
292
{{162, 133}, {204, 22}}
-
NO
YES
7
@@ -287,7 +273,6 @@
292
{{162, 152}, {210, 71}}
-
NO
YES
7
@@ -306,7 +291,6 @@
292
{{155, 8}, {278, 50}}
-
NO
NO
IBIPadFramework
@@ -317,7 +301,6 @@
292
{{177, 6}, {248, 54}}
-
NO
YES
7
@@ -340,7 +323,6 @@
292
{{686, 583}, {240, 117}}
-
NO
NO
IBIPadFramework
@@ -354,7 +336,6 @@
292
{{697, 592}, {138, 22}}
-
NO
YES
7
@@ -372,7 +353,6 @@
292
{{697, 609}, {218, 73}}
-
NO
YES
7
@@ -391,7 +371,6 @@
292
{{20, 587}, {240, 109}}
-
NO
NO
IBIPadFramework
@@ -402,7 +381,6 @@
292
{{30, 592}, {138, 22}}
-
NO
YES
7
@@ -420,7 +398,6 @@
292
{{30, 608}, {218, 73}}
-
NO
YES
7
@@ -439,7 +416,6 @@
292
{{45, 318}, {240, 128}}
-
NO
NO
IBIPadFramework
@@ -453,7 +429,6 @@
292
{{50, 326}, {229, 22}}
-
NO
YES
7
@@ -472,7 +447,6 @@
292
{{52, 348}, {224, 87}}
-
NO
YES
7
@@ -491,7 +465,6 @@
292
{{344, 635}, {240, 61}}
-
NO
NO
IBIPadFramework
@@ -502,7 +475,6 @@
292
{{353, 637}, {138, 22}}
-
NO
YES
7
@@ -520,7 +492,6 @@
292
{{354, 650}, {218, 46}}
-
NO
YES
7
@@ -536,8 +507,6 @@
{1024, 768}
-
-
3
MCAwLjQAA
@@ -816,7 +785,7 @@
YES
- HelpPageViewController
+ HelpPageLobbyViewController
UIResponder
UIControl
{{273, 125}, {1024, 768}}
@@ -874,7 +843,7 @@
YES
- HelpPageViewController
+ HelpPageLobbyViewController
UIViewController
dismiss
@@ -887,9 +856,27 @@
id
+
+ scrollView
+ UIScrollView
+
+
+ scrollView
+
+ scrollView
+ UIScrollView
+
+
IBProjectSource
- Classes/HelpPageViewController.h
+ Classes/HelpPageLobbyViewController.h
+
+
+
+ UILabel
+
+ IBProjectSource
+ Classes/ExtraCategories.h
@@ -1030,6 +1017,14 @@
+ UIScrollView
+ UIView
+
+ IBFrameworkSource
+ UIKit.framework/Headers/UIScrollView.h
+
+
+
UISearchBar
UIView
@@ -1049,6 +1044,13 @@
UIView
IBFrameworkSource
+ UIKit.framework/Headers/UIPrintFormatter.h
+
+
+
+ UIView
+
+ IBFrameworkSource
UIKit.framework/Headers/UITextField.h
@@ -1102,7 +1104,7 @@
IBIPadFramework
com.apple.InterfaceBuilder.CocoaTouchPlugin.iPhoneOS
-
+
com.apple.InterfaceBuilder.CocoaTouchPlugin.InterfaceBuilder3
@@ -1130,6 +1132,6 @@
{308, 144}
- 123
+ 132
diff -r 60b039d88dab -r d2df090453aa project_files/HedgewarsMobile/Classes/HelpPageLobbyViewController-iPhone.xib
--- a/project_files/HedgewarsMobile/Classes/HelpPageLobbyViewController-iPhone.xib Wed Mar 28 00:42:57 2012 +0200
+++ b/project_files/HedgewarsMobile/Classes/HelpPageLobbyViewController-iPhone.xib Wed Mar 28 01:19:36 2012 +0200
@@ -1,14 +1,14 @@
- 1024
- 10F569
- 804
- 1038.29
+ 1056
+ 10K549
+ 823
+ 1038.36
461.00
com.apple.InterfaceBuilder.IBCocoaTouchPlugin
- 123
+ 132
YES
@@ -568,7 +568,7 @@
YES
- HelpPageViewController
+ HelpPageLobbyViewController
UIResponder
{{16, 775}, {480, 320}}
com.apple.InterfaceBuilder.IBCocoaTouchPlugin
@@ -662,7 +662,7 @@
YES
- HelpPageViewController
+ HelpPageLobbyViewController
UIViewController
dismiss
@@ -688,7 +688,14 @@
IBProjectSource
- Classes/HelpPageViewController.h
+ Classes/HelpPageLobbyViewController.h
+
+
+
+ UILabel
+
+ IBProjectSource
+ Classes/ExtraCategories.h
@@ -840,6 +847,13 @@
UIView
IBFrameworkSource
+ UIKit.framework/Headers/UIPrintFormatter.h
+
+
+
+ UIView
+
+ IBFrameworkSource
UIKit.framework/Headers/UITextField.h
@@ -893,7 +907,7 @@
IBCocoaTouchFramework
com.apple.InterfaceBuilder.CocoaTouchPlugin.iPhoneOS
-
+
com.apple.InterfaceBuilder.CocoaTouchPlugin.InterfaceBuilder3
@@ -902,6 +916,6 @@
YES
../Hedgewars.xcodeproj
3
- 123
+ 132
diff -r 60b039d88dab -r d2df090453aa project_files/HedgewarsMobile/Classes/HelpPageLobbyViewController.h
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/project_files/HedgewarsMobile/Classes/HelpPageLobbyViewController.h Wed Mar 28 01:19:36 2012 +0200
@@ -0,0 +1,33 @@
+/*
+ * Hedgewars-iOS, a Hedgewars port for iOS devices
+ * Copyright (c) 2009-2012 Vittorio Giovara
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; version 2 of the License
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ *
+ * File created on 30/08/2010.
+ */
+
+
+#import
+
+
+@interface HelpPageLobbyViewController : UIViewController {
+ UIScrollView *scrollView;
+}
+
+@property (nonatomic, retain) IBOutlet UIScrollView *scrollView;
+
+-(IBAction) dismiss;
+
+@end
diff -r 60b039d88dab -r d2df090453aa project_files/HedgewarsMobile/Classes/HelpPageLobbyViewController.m
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/project_files/HedgewarsMobile/Classes/HelpPageLobbyViewController.m Wed Mar 28 01:19:36 2012 +0200
@@ -0,0 +1,66 @@
+/*
+ * Hedgewars-iOS, a Hedgewars port for iOS devices
+ * Copyright (c) 2009-2012 Vittorio Giovara
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; version 2 of the License
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ *
+ * File created on 30/08/2010.
+ */
+
+
+#import "HelpPageLobbyViewController.h"
+
+
+@implementation HelpPageLobbyViewController
+@synthesize scrollView;
+
+-(BOOL) shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation) interfaceOrientation {
+ return rotationManager(interfaceOrientation);
+}
+
+-(void) didReceiveMemoryWarning {
+ [super didReceiveMemoryWarning];
+ self.scrollView = nil;
+}
+
+// on iPhone the XIBs contain UIScrollView
+-(void) viewDidLoad {
+ if (IS_IPAD() == NO){
+ scrollView.contentSize = CGSizeMake(480,650);
+ scrollView.maximumZoomScale = 4.0;
+ scrollView.minimumZoomScale = 0.75;
+ scrollView.clipsToBounds = YES;
+ scrollView.delegate = self;
+ }
+ [super viewDidLoad];
+}
+
+-(void) viewDidUnload {
+ [super viewDidUnload];
+ self.scrollView = nil;
+}
+
+-(void) dealloc {
+ releaseAndNil(scrollView);
+ [super dealloc];
+}
+
+-(IBAction) dismiss {
+ [UIView beginAnimations:@"dismiss help" context:NULL];
+ self.view.alpha = 0;
+ [UIView commitAnimations];
+ [self.view performSelector:@selector(removeFromSuperview) withObject:nil afterDelay:1];
+}
+
+@end
diff -r 60b039d88dab -r d2df090453aa project_files/HedgewarsMobile/Classes/HelpPageViewController.h
--- a/project_files/HedgewarsMobile/Classes/HelpPageViewController.h Wed Mar 28 00:42:57 2012 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,33 +0,0 @@
-/*
- * Hedgewars-iOS, a Hedgewars port for iOS devices
- * Copyright (c) 2009-2012 Vittorio Giovara
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- *
- * File created on 30/08/2010.
- */
-
-
-#import
-
-
-@interface HelpPageViewController : UIViewController {
- UIScrollView *scrollView;
-}
-
-@property (nonatomic, retain) IBOutlet UIScrollView *scrollView;
-
--(IBAction) dismiss;
-
-@end
diff -r 60b039d88dab -r d2df090453aa project_files/HedgewarsMobile/Classes/HelpPageViewController.m
--- a/project_files/HedgewarsMobile/Classes/HelpPageViewController.m Wed Mar 28 00:42:57 2012 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,67 +0,0 @@
-/*
- * Hedgewars-iOS, a Hedgewars port for iOS devices
- * Copyright (c) 2009-2012 Vittorio Giovara
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- *
- * File created on 30/08/2010.
- */
-
-
-#import "HelpPageViewController.h"
-
-
-@implementation HelpPageViewController
-@synthesize scrollView;
-
--(BOOL) shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation) interfaceOrientation {
- return rotationManager(interfaceOrientation);
-}
-
--(void) didReceiveMemoryWarning {
- [super didReceiveMemoryWarning];
- self.scrollView = nil;
-}
-
-// on iPhone the XIBs contain UIScrollView
--(void) viewDidLoad {
- if (scrollView.tag == 0) // ipad
- scrollView.contentSize = CGSizeMake(480,650);
- else // iphone
- scrollView.contentSize = CGSizeMake(480,470);
- scrollView.maximumZoomScale = 4.0;
- scrollView.minimumZoomScale = 0.75;
- scrollView.clipsToBounds = YES;
- scrollView.delegate = self;
- [super viewDidLoad];
-}
-
--(void) viewDidUnload {
- [super viewDidUnload];
- self.scrollView = nil;
-}
-
--(void) dealloc {
- releaseAndNil(scrollView);
- [super dealloc];
-}
-
--(IBAction) dismiss {
- [UIView beginAnimations:@"helpingame" context:NULL];
- self.view.alpha = 0;
- [UIView commitAnimations];
- [self.view performSelector:@selector(removeFromSuperview) withObject:nil afterDelay:1];
-}
-
-@end
diff -r 60b039d88dab -r d2df090453aa project_files/HedgewarsMobile/Classes/OverlayViewController.h
--- a/project_files/HedgewarsMobile/Classes/OverlayViewController.h Wed Mar 28 00:42:57 2012 +0200
+++ b/project_files/HedgewarsMobile/Classes/OverlayViewController.h Wed Mar 28 01:19:36 2012 +0200
@@ -22,7 +22,7 @@
#import
@class InGameMenuViewController;
-@class HelpPageViewController;
+@class HelpPageInGameViewController;
@interface OverlayViewController : UIViewController {
// the timer that dims the overlay
@@ -34,7 +34,7 @@
BOOL isPopoverVisible;
// the help menu
- HelpPageViewController *helpPage;
+ HelpPageInGameViewController *helpPage;
// ths touch section
CGFloat initialDistanceForPinching;
@@ -49,7 +49,7 @@
@property (nonatomic,retain) id popoverController;
@property (nonatomic,retain) InGameMenuViewController *popupMenu;
-@property (nonatomic,retain) HelpPageViewController *helpPage;
+@property (nonatomic,retain) HelpPageInGameViewController *helpPage;
@property (nonatomic,retain) UIActivityIndicatorView *loadingIndicator;
@property (nonatomic,retain) UIButton *confirmButton;
@property (nonatomic,retain) UISegmentedControl *grenadeTimeSegment;
diff -r 60b039d88dab -r d2df090453aa project_files/HedgewarsMobile/Classes/OverlayViewController.m
--- a/project_files/HedgewarsMobile/Classes/OverlayViewController.m Wed Mar 28 00:42:57 2012 +0200
+++ b/project_files/HedgewarsMobile/Classes/OverlayViewController.m Wed Mar 28 01:19:36 2012 +0200
@@ -21,7 +21,7 @@
#import "OverlayViewController.h"
#import "InGameMenuViewController.h"
-#import "HelpPageViewController.h"
+#import "HelpPageInGameViewController.h"
#import "CGPointUtils.h"
@@ -269,7 +269,7 @@
-(void) showHelp:(id) sender {
if (self.helpPage == nil) {
NSString *xibName = (IS_IPAD() ? @"HelpPageInGameViewController-iPad" : @"HelpPageInGameViewController-iPhone");
- self.helpPage = [[HelpPageViewController alloc] initWithNibName:xibName bundle:nil];
+ self.helpPage = [[HelpPageInGameViewController alloc] initWithNibName:xibName bundle:nil];
}
self.helpPage.view.alpha = 0;
[self.view addSubview:helpPage.view];
diff -r 60b039d88dab -r d2df090453aa project_files/HedgewarsMobile/Hedgewars.xcodeproj/project.pbxproj
--- a/project_files/HedgewarsMobile/Hedgewars.xcodeproj/project.pbxproj Wed Mar 28 00:42:57 2012 +0200
+++ b/project_files/HedgewarsMobile/Hedgewars.xcodeproj/project.pbxproj Wed Mar 28 01:19:36 2012 +0200
@@ -71,7 +71,7 @@
611E12FF117BBBDA0044B62F /* Entitlements-Development.plist in Resources */ = {isa = PBXBuildFile; fileRef = 611E12FE117BBBDA0044B62F /* Entitlements-Development.plist */; };
611EE974122A9C4100DF6938 /* clickSound.wav in Resources */ = {isa = PBXBuildFile; fileRef = 611EE973122A9C4100DF6938 /* clickSound.wav */; };
611EE9DA122AA10A00DF6938 /* selSound.wav in Resources */ = {isa = PBXBuildFile; fileRef = 611EE9D8122AA10A00DF6938 /* selSound.wav */; };
- 611EEAEE122B2A4D00DF6938 /* HelpPageViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 611EEAEC122B2A4D00DF6938 /* HelpPageViewController.m */; };
+ 611EEAEE122B2A4D00DF6938 /* HelpPageInGameViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 611EEAEC122B2A4D00DF6938 /* HelpPageInGameViewController.m */; };
611EEAEF122B2A4D00DF6938 /* HelpPageLobbyViewController-iPad.xib in Resources */ = {isa = PBXBuildFile; fileRef = 611EEAED122B2A4D00DF6938 /* HelpPageLobbyViewController-iPad.xib */; };
611EEBC1122B34A800DF6938 /* helpingame.png in Resources */ = {isa = PBXBuildFile; fileRef = 611EEBC0122B34A800DF6938 /* helpingame.png */; };
611EEBC4122B355700DF6938 /* helpbottom.png in Resources */ = {isa = PBXBuildFile; fileRef = 611EEBC2122B355700DF6938 /* helpbottom.png */; };
@@ -205,6 +205,7 @@
6199E86D12464A8E00DADF8C /* surprise.png in Resources */ = {isa = PBXBuildFile; fileRef = 6199E86C12464A8E00DADF8C /* surprise.png */; };
619C5AF4124F7E3100D041AE /* LuaPas.pas in Sources */ = {isa = PBXBuildFile; fileRef = 619C5AF3124F7E3100D041AE /* LuaPas.pas */; };
619C5BA2124FA59000D041AE /* MapPreviewButtonView.m in Sources */ = {isa = PBXBuildFile; fileRef = 619C5BA1124FA59000D041AE /* MapPreviewButtonView.m */; };
+ 619E173A15227E8E0016654A /* HelpPageLobbyViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 619E173915227E8E0016654A /* HelpPageLobbyViewController.m */; };
61A1188511683A8C00359010 /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 61A117FE1168322700359010 /* CoreGraphics.framework */; settings = {ATTRIBUTES = (Required, ); }; };
61A19AFC14D20170004B1E6D /* libSDL.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 61A19AEA14D2010A004B1E6D /* libSDL.a */; };
61A19B7714D20B7A004B1E6D /* libSDL_image.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 61A19B6614D20B6C004B1E6D /* libSDL_image.a */; };
@@ -418,8 +419,8 @@
611EE973122A9C4100DF6938 /* clickSound.wav */ = {isa = PBXFileReference; lastKnownFileType = audio.wav; name = clickSound.wav; path = Resources/clickSound.wav; sourceTree = ""; };
611EE9D7122AA10A00DF6938 /* backSound.wav */ = {isa = PBXFileReference; lastKnownFileType = audio.wav; name = backSound.wav; path = Resources/backSound.wav; sourceTree = ""; };
611EE9D8122AA10A00DF6938 /* selSound.wav */ = {isa = PBXFileReference; lastKnownFileType = audio.wav; name = selSound.wav; path = Resources/selSound.wav; sourceTree = ""; };
- 611EEAEB122B2A4D00DF6938 /* HelpPageViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = HelpPageViewController.h; sourceTree = ""; };
- 611EEAEC122B2A4D00DF6938 /* HelpPageViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = HelpPageViewController.m; sourceTree = ""; };
+ 611EEAEB122B2A4D00DF6938 /* HelpPageInGameViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = HelpPageInGameViewController.h; sourceTree = ""; };
+ 611EEAEC122B2A4D00DF6938 /* HelpPageInGameViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = HelpPageInGameViewController.m; sourceTree = ""; };
611EEAED122B2A4D00DF6938 /* HelpPageLobbyViewController-iPad.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = "HelpPageLobbyViewController-iPad.xib"; sourceTree = ""; };
611EEBC0122B34A800DF6938 /* helpingame.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = helpingame.png; path = Resources/Overlay/helpingame.png; sourceTree = ""; };
611EEBC2122B355700DF6938 /* helpbottom.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = helpbottom.png; path = Resources/Overlay/helpbottom.png; sourceTree = ""; };
@@ -620,6 +621,8 @@
619C5AF3124F7E3100D041AE /* LuaPas.pas */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.pascal; name = LuaPas.pas; path = ../../hedgewars/LuaPas.pas; sourceTree = SOURCE_ROOT; };
619C5BA0124FA59000D041AE /* MapPreviewButtonView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = MapPreviewButtonView.h; path = Classes/MapPreviewButtonView.h; sourceTree = ""; };
619C5BA1124FA59000D041AE /* MapPreviewButtonView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = MapPreviewButtonView.m; path = Classes/MapPreviewButtonView.m; sourceTree = ""; };
+ 619E173815227E8E0016654A /* HelpPageLobbyViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = HelpPageLobbyViewController.h; sourceTree = ""; };
+ 619E173915227E8E0016654A /* HelpPageLobbyViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = HelpPageLobbyViewController.m; sourceTree = ""; };
61A117FE1168322700359010 /* CoreGraphics.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreGraphics.framework; path = System/Library/Frameworks/CoreGraphics.framework; sourceTree = SDKROOT; };
61A19AE314D2010A004B1E6D /* SDL.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = SDL.xcodeproj; path = "../../../Library/SDL/Xcode-iOS/SDL/SDL.xcodeproj"; sourceTree = SOURCE_ROOT; };
61A19B6114D20B6C004B1E6D /* SDL_image.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = SDL_image.xcodeproj; path = "../../../Library/SDL_image/Xcode-iOS/SDL_image.xcodeproj"; sourceTree = SOURCE_ROOT; };
@@ -1002,13 +1005,15 @@
6163EE6C11CC253F001C0453 /* Overlay */ = {
isa = PBXGroup;
children = (
+ 619E173815227E8E0016654A /* HelpPageLobbyViewController.h */,
+ 619E173915227E8E0016654A /* HelpPageLobbyViewController.m */,
616591F811CA9BA200D6E256 /* InGameMenuViewController.h */,
616591F911CA9BA200D6E256 /* InGameMenuViewController.m */,
616591F611CA9BA200D6E256 /* OverlayViewController.h */,
616591F711CA9BA200D6E256 /* OverlayViewController.m */,
6165925011CA9CB400D6E256 /* OverlayViewController.xib */,
- 611EEAEB122B2A4D00DF6938 /* HelpPageViewController.h */,
- 611EEAEC122B2A4D00DF6938 /* HelpPageViewController.m */,
+ 611EEAEB122B2A4D00DF6938 /* HelpPageInGameViewController.h */,
+ 611EEAEC122B2A4D00DF6938 /* HelpPageInGameViewController.m */,
61DF0F201284F72A00F3F10B /* HelpPageInGameViewController-iPhone.xib */,
61842B23122B619D0096E335 /* HelpPageInGameViewController-iPad.xib */,
61DF0EDB1284DF2300F3F10B /* HelpPageLobbyViewController-iPhone.xib */,
@@ -1726,7 +1731,7 @@
61B3D71C11EA6F2700EC7420 /* uKeys.pas in Sources */,
61C079E411F35A300072BF46 /* EditableCellView.m in Sources */,
61F2E7CE1205EDE0005734F7 /* AboutViewController.m in Sources */,
- 611EEAEE122B2A4D00DF6938 /* HelpPageViewController.m in Sources */,
+ 611EEAEE122B2A4D00DF6938 /* HelpPageInGameViewController.m in Sources */,
6199E839124647DE00DADF8C /* SupportViewController.m in Sources */,
611D9BFB12497E9800008271 /* SavedGamesViewController.m in Sources */,
619C5AF4124F7E3100D041AE /* LuaPas.pas in Sources */,
@@ -1768,6 +1773,7 @@
615E76BC14E4421200FBA131 /* MGSplitCornersView.m in Sources */,
615E76BD14E4421200FBA131 /* MGSplitDividerView.m in Sources */,
615E76BE14E4421200FBA131 /* MGSplitViewController.m in Sources */,
+ 619E173A15227E8E0016654A /* HelpPageLobbyViewController.m in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};