cocoaTouch/MainMenuViewController.m
author smxx
Wed, 31 Mar 2010 17:52:55 +0000
changeset 3213 e48678c8cd28
parent 3199 1a9938a27677
child 3245 252be02536ab
permissions -rw-r--r--
General: * Updated changelog for 0.9.13 (might require some sorting)
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
2685
0ba746be5d59 frontend images by Tiy, first setup of frontend
koda
parents:
diff changeset
     1
//
0ba746be5d59 frontend images by Tiy, first setup of frontend
koda
parents:
diff changeset
     2
//  MainMenuViewController.m
0ba746be5d59 frontend images by Tiy, first setup of frontend
koda
parents:
diff changeset
     3
//  hwengine
0ba746be5d59 frontend images by Tiy, first setup of frontend
koda
parents:
diff changeset
     4
//
0ba746be5d59 frontend images by Tiy, first setup of frontend
koda
parents:
diff changeset
     5
//  Created by Vittorio on 08/01/10.
0ba746be5d59 frontend images by Tiy, first setup of frontend
koda
parents:
diff changeset
     6
//  Copyright 2010 __MyCompanyName__. All rights reserved.
0ba746be5d59 frontend images by Tiy, first setup of frontend
koda
parents:
diff changeset
     7
//
0ba746be5d59 frontend images by Tiy, first setup of frontend
koda
parents:
diff changeset
     8
0ba746be5d59 frontend images by Tiy, first setup of frontend
koda
parents:
diff changeset
     9
#import "MainMenuViewController.h"
0ba746be5d59 frontend images by Tiy, first setup of frontend
koda
parents:
diff changeset
    10
#import "SDL_uikitappdelegate.h"
2799
558b29bf00c5 add a new way to fetch version info from pascal to c
koda
parents: 2743
diff changeset
    11
#import "PascalImports.h"
2685
0ba746be5d59 frontend images by Tiy, first setup of frontend
koda
parents:
diff changeset
    12
2803
1f446fc5c8ec allow to compile engine as library with HWLIBRARY symbol
koda
parents: 2799
diff changeset
    13
// in case we don't want SDL_mixer...
1f446fc5c8ec allow to compile engine as library with HWLIBRARY symbol
koda
parents: 2799
diff changeset
    14
//#import "SoundEffect.h"	
1f446fc5c8ec allow to compile engine as library with HWLIBRARY symbol
koda
parents: 2799
diff changeset
    15
//SoundEffect *erasingSound = [[SoundEffect alloc] initWithContentsOfFile:[mainBundle pathForResource:@"Erase" ofType:@"caf"]];
1f446fc5c8ec allow to compile engine as library with HWLIBRARY symbol
koda
parents: 2799
diff changeset
    16
//SoundEffect *selectSound = [[SoundEffect alloc] initWithContentsOfFile:[mainBundle pathForResource:@"Select" ofType:@"caf"]];
1f446fc5c8ec allow to compile engine as library with HWLIBRARY symbol
koda
parents: 2799
diff changeset
    17
1f446fc5c8ec allow to compile engine as library with HWLIBRARY symbol
koda
parents: 2799
diff changeset
    18
2685
0ba746be5d59 frontend images by Tiy, first setup of frontend
koda
parents:
diff changeset
    19
@implementation MainMenuViewController
0ba746be5d59 frontend images by Tiy, first setup of frontend
koda
parents:
diff changeset
    20
2743
39d097ac2276 implement transition in the way i had in mind
koda
parents: 2740
diff changeset
    21
@synthesize versionLabel, settingsViewController, mainView;
2685
0ba746be5d59 frontend images by Tiy, first setup of frontend
koda
parents:
diff changeset
    22
2740
03df0573a9fd programmatically load main controller
koda
parents: 2738
diff changeset
    23
-(BOOL) shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation) interfaceOrientation {
03df0573a9fd programmatically load main controller
koda
parents: 2738
diff changeset
    24
	return (interfaceOrientation == UIInterfaceOrientationLandscapeRight);
03df0573a9fd programmatically load main controller
koda
parents: 2738
diff changeset
    25
}
03df0573a9fd programmatically load main controller
koda
parents: 2738
diff changeset
    26
03df0573a9fd programmatically load main controller
koda
parents: 2738
diff changeset
    27
- (void)didReceiveMemoryWarning {
03df0573a9fd programmatically load main controller
koda
parents: 2738
diff changeset
    28
	// Releases the view if it doesn't have a superview.
03df0573a9fd programmatically load main controller
koda
parents: 2738
diff changeset
    29
	[super didReceiveMemoryWarning];
03df0573a9fd programmatically load main controller
koda
parents: 2738
diff changeset
    30
	
03df0573a9fd programmatically load main controller
koda
parents: 2738
diff changeset
    31
	// Release any cached data, images, etc that aren't in use.
03df0573a9fd programmatically load main controller
koda
parents: 2738
diff changeset
    32
	if (nil == self.settingsViewController.view.superview) {
03df0573a9fd programmatically load main controller
koda
parents: 2738
diff changeset
    33
		self.settingsViewController = nil;
2799
558b29bf00c5 add a new way to fetch version info from pascal to c
koda
parents: 2743
diff changeset
    34
		[settingsViewController release];
2740
03df0573a9fd programmatically load main controller
koda
parents: 2738
diff changeset
    35
	}
03df0573a9fd programmatically load main controller
koda
parents: 2738
diff changeset
    36
}
03df0573a9fd programmatically load main controller
koda
parents: 2738
diff changeset
    37
2687
28b8330b8af1 add stub files for other views and prevent useless crashes
koda
parents: 2685
diff changeset
    38
-(void) viewDidLoad {
2803
1f446fc5c8ec allow to compile engine as library with HWLIBRARY symbol
koda
parents: 2799
diff changeset
    39
	[NSThread detachNewThreadSelector:@selector(checkFirstRun) toTarget:self withObject:nil];
3199
1a9938a27677 fixes to the mac build system
koda
parents: 3063
diff changeset
    40
	/*
1a9938a27677 fixes to the mac build system
koda
parents: 3063
diff changeset
    41
	char *ver;
1a9938a27677 fixes to the mac build system
koda
parents: 3063
diff changeset
    42
	HW_versionInfo(NULL, &ver);
1a9938a27677 fixes to the mac build system
koda
parents: 3063
diff changeset
    43
    NSString *versionNumber = [[NSString alloc] initWithCString:ver];
1a9938a27677 fixes to the mac build system
koda
parents: 3063
diff changeset
    44
	self.versionLabel.text = versionNumber;
1a9938a27677 fixes to the mac build system
koda
parents: 3063
diff changeset
    45
    [versionNumber release];
1a9938a27677 fixes to the mac build system
koda
parents: 3063
diff changeset
    46
    */
2740
03df0573a9fd programmatically load main controller
koda
parents: 2738
diff changeset
    47
	[super viewDidLoad];
2685
0ba746be5d59 frontend images by Tiy, first setup of frontend
koda
parents:
diff changeset
    48
}
2723
eaa6ac1e95ea LANDSCAPE ON IPHONE
koda
parents: 2694
diff changeset
    49
2685
0ba746be5d59 frontend images by Tiy, first setup of frontend
koda
parents:
diff changeset
    50
- (void)viewDidUnload {
0ba746be5d59 frontend images by Tiy, first setup of frontend
koda
parents:
diff changeset
    51
	// Release any retained subviews of the main view.
0ba746be5d59 frontend images by Tiy, first setup of frontend
koda
parents:
diff changeset
    52
	self.versionLabel = nil;
0ba746be5d59 frontend images by Tiy, first setup of frontend
koda
parents:
diff changeset
    53
}
0ba746be5d59 frontend images by Tiy, first setup of frontend
koda
parents:
diff changeset
    54
0ba746be5d59 frontend images by Tiy, first setup of frontend
koda
parents:
diff changeset
    55
- (void)dealloc {
0ba746be5d59 frontend images by Tiy, first setup of frontend
koda
parents:
diff changeset
    56
	[versionLabel release];
2740
03df0573a9fd programmatically load main controller
koda
parents: 2738
diff changeset
    57
	[settingsViewController release];
03df0573a9fd programmatically load main controller
koda
parents: 2738
diff changeset
    58
	[super dealloc];
2685
0ba746be5d59 frontend images by Tiy, first setup of frontend
koda
parents:
diff changeset
    59
}
0ba746be5d59 frontend images by Tiy, first setup of frontend
koda
parents:
diff changeset
    60
2694
dcd248e04f3d can use latest sdlimage, work on setting panel and option when launching the game, minor fixes
koda
parents: 2687
diff changeset
    61
// disable the buttons when to prevent launching twice the game
dcd248e04f3d can use latest sdlimage, work on setting panel and option when launching the game, minor fixes
koda
parents: 2687
diff changeset
    62
-(void) viewWillDisappear:(BOOL)animated {
2743
39d097ac2276 implement transition in the way i had in mind
koda
parents: 2740
diff changeset
    63
	self.mainView.userInteractionEnabled = NO;
2694
dcd248e04f3d can use latest sdlimage, work on setting panel and option when launching the game, minor fixes
koda
parents: 2687
diff changeset
    64
	[super viewWillDisappear:animated];
dcd248e04f3d can use latest sdlimage, work on setting panel and option when launching the game, minor fixes
koda
parents: 2687
diff changeset
    65
}
dcd248e04f3d can use latest sdlimage, work on setting panel and option when launching the game, minor fixes
koda
parents: 2687
diff changeset
    66
2743
39d097ac2276 implement transition in the way i had in mind
koda
parents: 2740
diff changeset
    67
-(void) viewDidAppear:(BOOL)animated {
39d097ac2276 implement transition in the way i had in mind
koda
parents: 2740
diff changeset
    68
	self.mainView.userInteractionEnabled = YES;
39d097ac2276 implement transition in the way i had in mind
koda
parents: 2740
diff changeset
    69
	[super viewDidAppear:animated];
2694
dcd248e04f3d can use latest sdlimage, work on setting panel and option when launching the game, minor fixes
koda
parents: 2687
diff changeset
    70
}
dcd248e04f3d can use latest sdlimage, work on setting panel and option when launching the game, minor fixes
koda
parents: 2687
diff changeset
    71
2803
1f446fc5c8ec allow to compile engine as library with HWLIBRARY symbol
koda
parents: 2799
diff changeset
    72
-(void) checkFirstRun {
1f446fc5c8ec allow to compile engine as library with HWLIBRARY symbol
koda
parents: 2799
diff changeset
    73
	NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
1f446fc5c8ec allow to compile engine as library with HWLIBRARY symbol
koda
parents: 2799
diff changeset
    74
	
1f446fc5c8ec allow to compile engine as library with HWLIBRARY symbol
koda
parents: 2799
diff changeset
    75
	NSString *filePath = [[SDLUIKitDelegate sharedAppDelegate] dataFilePath:@"settings.plist"];
1f446fc5c8ec allow to compile engine as library with HWLIBRARY symbol
koda
parents: 2799
diff changeset
    76
	if (!([[NSFileManager defaultManager] fileExistsAtPath:filePath])) {
1f446fc5c8ec allow to compile engine as library with HWLIBRARY symbol
koda
parents: 2799
diff changeset
    77
		// file not present, means that also other files are absent
1f446fc5c8ec allow to compile engine as library with HWLIBRARY symbol
koda
parents: 2799
diff changeset
    78
		NSLog(@"First time run, creating settings files");
1f446fc5c8ec allow to compile engine as library with HWLIBRARY symbol
koda
parents: 2799
diff changeset
    79
		
1f446fc5c8ec allow to compile engine as library with HWLIBRARY symbol
koda
parents: 2799
diff changeset
    80
		// show a popup with an indicator to make the user wait
1f446fc5c8ec allow to compile engine as library with HWLIBRARY symbol
koda
parents: 2799
diff changeset
    81
		UIAlertView *alert = [[UIAlertView alloc] initWithTitle:NSLocalizedString(@"One-time Preferences Configuration",@"")
3029
67483e87590c a couple of smaller cleanups that didn't get in previous commit
koda
parents: 3027
diff changeset
    82
                                                        message:nil
67483e87590c a couple of smaller cleanups that didn't get in previous commit
koda
parents: 3027
diff changeset
    83
                                                       delegate:nil
67483e87590c a couple of smaller cleanups that didn't get in previous commit
koda
parents: 3027
diff changeset
    84
                                              cancelButtonTitle:nil
67483e87590c a couple of smaller cleanups that didn't get in previous commit
koda
parents: 3027
diff changeset
    85
                                              otherButtonTitles:nil];
2803
1f446fc5c8ec allow to compile engine as library with HWLIBRARY symbol
koda
parents: 2799
diff changeset
    86
		[alert show];
1f446fc5c8ec allow to compile engine as library with HWLIBRARY symbol
koda
parents: 2799
diff changeset
    87
		
1f446fc5c8ec allow to compile engine as library with HWLIBRARY symbol
koda
parents: 2799
diff changeset
    88
		UIActivityIndicatorView *indicator = [[UIActivityIndicatorView alloc] 
1f446fc5c8ec allow to compile engine as library with HWLIBRARY symbol
koda
parents: 2799
diff changeset
    89
						      initWithActivityIndicatorStyle:UIActivityIndicatorViewStyleWhiteLarge];
1f446fc5c8ec allow to compile engine as library with HWLIBRARY symbol
koda
parents: 2799
diff changeset
    90
		indicator.center = CGPointMake(alert.bounds.size.width / 2, alert.bounds.size.height - 50);
1f446fc5c8ec allow to compile engine as library with HWLIBRARY symbol
koda
parents: 2799
diff changeset
    91
		[indicator startAnimating];
1f446fc5c8ec allow to compile engine as library with HWLIBRARY symbol
koda
parents: 2799
diff changeset
    92
		[alert addSubview:indicator];
1f446fc5c8ec allow to compile engine as library with HWLIBRARY symbol
koda
parents: 2799
diff changeset
    93
		[indicator release];
1f446fc5c8ec allow to compile engine as library with HWLIBRARY symbol
koda
parents: 2799
diff changeset
    94
		
1f446fc5c8ec allow to compile engine as library with HWLIBRARY symbol
koda
parents: 2799
diff changeset
    95
		// create settings.plist
1f446fc5c8ec allow to compile engine as library with HWLIBRARY symbol
koda
parents: 2799
diff changeset
    96
		NSMutableDictionary *saveDict = [[NSMutableDictionary alloc] init];
1f446fc5c8ec allow to compile engine as library with HWLIBRARY symbol
koda
parents: 2799
diff changeset
    97
	
1f446fc5c8ec allow to compile engine as library with HWLIBRARY symbol
koda
parents: 2799
diff changeset
    98
		[saveDict setObject:@"" forKey:@"username"];
1f446fc5c8ec allow to compile engine as library with HWLIBRARY symbol
koda
parents: 2799
diff changeset
    99
		[saveDict setObject:@"" forKey:@"password"];
1f446fc5c8ec allow to compile engine as library with HWLIBRARY symbol
koda
parents: 2799
diff changeset
   100
		[saveDict setObject:@"1" forKey:@"music"];
1f446fc5c8ec allow to compile engine as library with HWLIBRARY symbol
koda
parents: 2799
diff changeset
   101
		[saveDict setObject:@"1" forKey:@"sounds"];
1f446fc5c8ec allow to compile engine as library with HWLIBRARY symbol
koda
parents: 2799
diff changeset
   102
		[saveDict setObject:@"0" forKey:@"alternate"];
1f446fc5c8ec allow to compile engine as library with HWLIBRARY symbol
koda
parents: 2799
diff changeset
   103
	
1f446fc5c8ec allow to compile engine as library with HWLIBRARY symbol
koda
parents: 2799
diff changeset
   104
		[saveDict writeToFile:filePath atomically:YES];
1f446fc5c8ec allow to compile engine as library with HWLIBRARY symbol
koda
parents: 2799
diff changeset
   105
		[saveDict release];
1f446fc5c8ec allow to compile engine as library with HWLIBRARY symbol
koda
parents: 2799
diff changeset
   106
		
1f446fc5c8ec allow to compile engine as library with HWLIBRARY symbol
koda
parents: 2799
diff changeset
   107
		// create other files
1f446fc5c8ec allow to compile engine as library with HWLIBRARY symbol
koda
parents: 2799
diff changeset
   108
		
1f446fc5c8ec allow to compile engine as library with HWLIBRARY symbol
koda
parents: 2799
diff changeset
   109
		// memory cleanup
1f446fc5c8ec allow to compile engine as library with HWLIBRARY symbol
koda
parents: 2799
diff changeset
   110
		[alert dismissWithClickedButtonIndex:0 animated:YES];
1f446fc5c8ec allow to compile engine as library with HWLIBRARY symbol
koda
parents: 2799
diff changeset
   111
		[alert release];
1f446fc5c8ec allow to compile engine as library with HWLIBRARY symbol
koda
parents: 2799
diff changeset
   112
	}
1f446fc5c8ec allow to compile engine as library with HWLIBRARY symbol
koda
parents: 2799
diff changeset
   113
	[pool release];
1f446fc5c8ec allow to compile engine as library with HWLIBRARY symbol
koda
parents: 2799
diff changeset
   114
	[NSThread exit];
1f446fc5c8ec allow to compile engine as library with HWLIBRARY symbol
koda
parents: 2799
diff changeset
   115
}
1f446fc5c8ec allow to compile engine as library with HWLIBRARY symbol
koda
parents: 2799
diff changeset
   116
3027
32890edaa483 lotsa optimizations and redraws for the iFrontend
koda
parents: 3026
diff changeset
   117
-(void) appear {
3029
67483e87590c a couple of smaller cleanups that didn't get in previous commit
koda
parents: 3027
diff changeset
   118
    [[SDLUIKitDelegate sharedAppDelegate].uiwindow addSubview:self.view];
3063
0092dc37fbd6 reworked interaction of engine/frontend when closing
koda
parents: 3034
diff changeset
   119
    [self release];
0092dc37fbd6 reworked interaction of engine/frontend when closing
koda
parents: 3034
diff changeset
   120
    
3027
32890edaa483 lotsa optimizations and redraws for the iFrontend
koda
parents: 3026
diff changeset
   121
    [UIView beginAnimations:@"inserting main controller" context:NULL];
32890edaa483 lotsa optimizations and redraws for the iFrontend
koda
parents: 3026
diff changeset
   122
	[UIView setAnimationDuration:1];
32890edaa483 lotsa optimizations and redraws for the iFrontend
koda
parents: 3026
diff changeset
   123
	self.view.alpha = 1;
32890edaa483 lotsa optimizations and redraws for the iFrontend
koda
parents: 3026
diff changeset
   124
	[UIView commitAnimations];
32890edaa483 lotsa optimizations and redraws for the iFrontend
koda
parents: 3026
diff changeset
   125
}
32890edaa483 lotsa optimizations and redraws for the iFrontend
koda
parents: 3026
diff changeset
   126
32890edaa483 lotsa optimizations and redraws for the iFrontend
koda
parents: 3026
diff changeset
   127
-(void) disappear {
32890edaa483 lotsa optimizations and redraws for the iFrontend
koda
parents: 3026
diff changeset
   128
    [UIView beginAnimations:@"removing main controller" context:NULL];
32890edaa483 lotsa optimizations and redraws for the iFrontend
koda
parents: 3026
diff changeset
   129
	[UIView setAnimationDuration:1];
32890edaa483 lotsa optimizations and redraws for the iFrontend
koda
parents: 3026
diff changeset
   130
	self.view.alpha = 0;
32890edaa483 lotsa optimizations and redraws for the iFrontend
koda
parents: 3026
diff changeset
   131
	[UIView commitAnimations];
3063
0092dc37fbd6 reworked interaction of engine/frontend when closing
koda
parents: 3034
diff changeset
   132
    
0092dc37fbd6 reworked interaction of engine/frontend when closing
koda
parents: 3034
diff changeset
   133
    [self retain];
3029
67483e87590c a couple of smaller cleanups that didn't get in previous commit
koda
parents: 3027
diff changeset
   134
    [self.view removeFromSuperview];
3027
32890edaa483 lotsa optimizations and redraws for the iFrontend
koda
parents: 3026
diff changeset
   135
}
32890edaa483 lotsa optimizations and redraws for the iFrontend
koda
parents: 3026
diff changeset
   136
2740
03df0573a9fd programmatically load main controller
koda
parents: 2738
diff changeset
   137
#pragma mark -
03df0573a9fd programmatically load main controller
koda
parents: 2738
diff changeset
   138
#pragma mark Action buttons
2685
0ba746be5d59 frontend images by Tiy, first setup of frontend
koda
parents:
diff changeset
   139
-(IBAction) startPlaying {
0ba746be5d59 frontend images by Tiy, first setup of frontend
koda
parents:
diff changeset
   140
	[[SDLUIKitDelegate sharedAppDelegate] startSDLgame];
0ba746be5d59 frontend images by Tiy, first setup of frontend
koda
parents:
diff changeset
   141
}
2687
28b8330b8af1 add stub files for other views and prevent useless crashes
koda
parents: 2685
diff changeset
   142
28b8330b8af1 add stub files for other views and prevent useless crashes
koda
parents: 2685
diff changeset
   143
-(IBAction) notYetImplemented {
28b8330b8af1 add stub files for other views and prevent useless crashes
koda
parents: 2685
diff changeset
   144
	UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@"Not Yet Implemented"
3029
67483e87590c a couple of smaller cleanups that didn't get in previous commit
koda
parents: 3027
diff changeset
   145
                                                    message:@"Sorry, this feature is not yet implemented"
67483e87590c a couple of smaller cleanups that didn't get in previous commit
koda
parents: 3027
diff changeset
   146
                                                   delegate:nil
67483e87590c a couple of smaller cleanups that didn't get in previous commit
koda
parents: 3027
diff changeset
   147
                                          cancelButtonTitle:@"Well, don't worry"
67483e87590c a couple of smaller cleanups that didn't get in previous commit
koda
parents: 3027
diff changeset
   148
                                          otherButtonTitles:nil];
2687
28b8330b8af1 add stub files for other views and prevent useless crashes
koda
parents: 2685
diff changeset
   149
	[alert show];
28b8330b8af1 add stub files for other views and prevent useless crashes
koda
parents: 2685
diff changeset
   150
	[alert release];
28b8330b8af1 add stub files for other views and prevent useless crashes
koda
parents: 2685
diff changeset
   151
}
28b8330b8af1 add stub files for other views and prevent useless crashes
koda
parents: 2685
diff changeset
   152
2740
03df0573a9fd programmatically load main controller
koda
parents: 2738
diff changeset
   153
-(IBAction) switchViews:(id)sender {
03df0573a9fd programmatically load main controller
koda
parents: 2738
diff changeset
   154
	// view not displayed or not created
03df0573a9fd programmatically load main controller
koda
parents: 2738
diff changeset
   155
	if (nil == self.settingsViewController.view.superview) {
03df0573a9fd programmatically load main controller
koda
parents: 2738
diff changeset
   156
		// view not created
03df0573a9fd programmatically load main controller
koda
parents: 2738
diff changeset
   157
		if (nil == self.settingsViewController) {
3034
b576460ba8ad fix a rotation glitch
koda
parents: 3029
diff changeset
   158
			SettingsViewController *controller = [[SettingsViewController alloc] initWithNibName:@"SettingsViewController" bundle:nil];
2740
03df0573a9fd programmatically load main controller
koda
parents: 2738
diff changeset
   159
			self.settingsViewController = controller;
03df0573a9fd programmatically load main controller
koda
parents: 2738
diff changeset
   160
			[controller release];
03df0573a9fd programmatically load main controller
koda
parents: 2738
diff changeset
   161
		}
2805
36a8cebb91e8 new menupage ingame for common actions
koda
parents: 2803
diff changeset
   162
		self.settingsViewController.view.frame = CGRectMake(0, -257, 480, 278);
2799
558b29bf00c5 add a new way to fetch version info from pascal to c
koda
parents: 2743
diff changeset
   163
		self.settingsViewController.parentView = self.mainView;
2740
03df0573a9fd programmatically load main controller
koda
parents: 2738
diff changeset
   164
2805
36a8cebb91e8 new menupage ingame for common actions
koda
parents: 2803
diff changeset
   165
		[UIView beginAnimations:@"Settings SwitchView" context:NULL];
2799
558b29bf00c5 add a new way to fetch version info from pascal to c
koda
parents: 2743
diff changeset
   166
		[UIView setAnimationDuration:1];
2803
1f446fc5c8ec allow to compile engine as library with HWLIBRARY symbol
koda
parents: 2799
diff changeset
   167
2805
36a8cebb91e8 new menupage ingame for common actions
koda
parents: 2803
diff changeset
   168
		self.settingsViewController.view.frame = CGRectMake(0, 21, 480, 278);
36a8cebb91e8 new menupage ingame for common actions
koda
parents: 2803
diff changeset
   169
		self.mainView.frame = CGRectMake(0, 299, 480, 278);
2803
1f446fc5c8ec allow to compile engine as library with HWLIBRARY symbol
koda
parents: 2799
diff changeset
   170
		[UIView commitAnimations];
2740
03df0573a9fd programmatically load main controller
koda
parents: 2738
diff changeset
   171
		
2805
36a8cebb91e8 new menupage ingame for common actions
koda
parents: 2803
diff changeset
   172
		[self.view insertSubview:settingsViewController.view atIndex:0];
2740
03df0573a9fd programmatically load main controller
koda
parents: 2738
diff changeset
   173
	}
03df0573a9fd programmatically load main controller
koda
parents: 2738
diff changeset
   174
}
03df0573a9fd programmatically load main controller
koda
parents: 2738
diff changeset
   175
2685
0ba746be5d59 frontend images by Tiy, first setup of frontend
koda
parents:
diff changeset
   176
@end