cocoaTouch/iPad/MainMenuViewController.m
author koda
Fri, 02 Apr 2010 22:44:14 +0000
changeset 3270 9bd8fb1707b9
parent 3251 221c163ad5d9
permissions -rw-r--r--
initial support for hat selection on the ifrontend
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
3113
2829ea0dd47c * port fadeout to opengles
koda
parents:
diff changeset
     1
//
2829ea0dd47c * port fadeout to opengles
koda
parents:
diff changeset
     2
//  MainMenuViewController.m
2829ea0dd47c * port fadeout to opengles
koda
parents:
diff changeset
     3
//  hwengine
2829ea0dd47c * port fadeout to opengles
koda
parents:
diff changeset
     4
//
2829ea0dd47c * port fadeout to opengles
koda
parents:
diff changeset
     5
//  Created by Vittorio on 08/01/10.
2829ea0dd47c * port fadeout to opengles
koda
parents:
diff changeset
     6
//  Copyright 2010 __MyCompanyName__. All rights reserved.
2829ea0dd47c * port fadeout to opengles
koda
parents:
diff changeset
     7
//
2829ea0dd47c * port fadeout to opengles
koda
parents:
diff changeset
     8
2829ea0dd47c * port fadeout to opengles
koda
parents:
diff changeset
     9
#import "MainMenuViewController.h"
2829ea0dd47c * port fadeout to opengles
koda
parents:
diff changeset
    10
#import "SDL_uikitappdelegate.h"
2829ea0dd47c * port fadeout to opengles
koda
parents:
diff changeset
    11
#import "PascalImports.h"
2829ea0dd47c * port fadeout to opengles
koda
parents:
diff changeset
    12
#import "SplitViewRootController.h"
2829ea0dd47c * port fadeout to opengles
koda
parents:
diff changeset
    13
2829ea0dd47c * port fadeout to opengles
koda
parents:
diff changeset
    14
2829ea0dd47c * port fadeout to opengles
koda
parents:
diff changeset
    15
@implementation MainMenuViewController
3122
e005359efc59 hide the background gl context that remains active (might be worth freeing ithide the background gl context that remains active (might be worth freeing it))
koda
parents: 3113
diff changeset
    16
@synthesize cover;
3113
2829ea0dd47c * port fadeout to opengles
koda
parents:
diff changeset
    17
2829ea0dd47c * port fadeout to opengles
koda
parents:
diff changeset
    18
-(BOOL) shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation) interfaceOrientation {
2829ea0dd47c * port fadeout to opengles
koda
parents:
diff changeset
    19
	return (interfaceOrientation == UIInterfaceOrientationLandscapeRight);
2829ea0dd47c * port fadeout to opengles
koda
parents:
diff changeset
    20
}
2829ea0dd47c * port fadeout to opengles
koda
parents:
diff changeset
    21
2829ea0dd47c * port fadeout to opengles
koda
parents:
diff changeset
    22
- (void)didReceiveMemoryWarning {
2829ea0dd47c * port fadeout to opengles
koda
parents:
diff changeset
    23
	// Releases the view if it doesn't have a superview.
2829ea0dd47c * port fadeout to opengles
koda
parents:
diff changeset
    24
	[super didReceiveMemoryWarning];
2829ea0dd47c * port fadeout to opengles
koda
parents:
diff changeset
    25
}
2829ea0dd47c * port fadeout to opengles
koda
parents:
diff changeset
    26
2829ea0dd47c * port fadeout to opengles
koda
parents:
diff changeset
    27
- (void)dealloc {
3250
d5cd1a617123 intial support for team configuration on the ifrontend
koda
parents: 3165
diff changeset
    28
    [cover release];
3113
2829ea0dd47c * port fadeout to opengles
koda
parents:
diff changeset
    29
	[super dealloc];
2829ea0dd47c * port fadeout to opengles
koda
parents:
diff changeset
    30
}
2829ea0dd47c * port fadeout to opengles
koda
parents:
diff changeset
    31
3250
d5cd1a617123 intial support for team configuration on the ifrontend
koda
parents: 3165
diff changeset
    32
-(void) viewDidUnload {
d5cd1a617123 intial support for team configuration on the ifrontend
koda
parents: 3165
diff changeset
    33
    self.cover = nil;
d5cd1a617123 intial support for team configuration on the ifrontend
koda
parents: 3165
diff changeset
    34
	[super viewDidUnload];
d5cd1a617123 intial support for team configuration on the ifrontend
koda
parents: 3165
diff changeset
    35
}
d5cd1a617123 intial support for team configuration on the ifrontend
koda
parents: 3165
diff changeset
    36
3113
2829ea0dd47c * port fadeout to opengles
koda
parents:
diff changeset
    37
-(void) viewDidLoad {
2829ea0dd47c * port fadeout to opengles
koda
parents:
diff changeset
    38
    // initialize some files the first time we load the game
2829ea0dd47c * port fadeout to opengles
koda
parents:
diff changeset
    39
	[NSThread detachNewThreadSelector:@selector(checkFirstRun) toTarget:self withObject:nil];
3250
d5cd1a617123 intial support for team configuration on the ifrontend
koda
parents: 3165
diff changeset
    40
    // listen to request to remove the modalviewcontroller
3251
221c163ad5d9 continue working for team support on the ifrontend
koda
parents: 3250
diff changeset
    41
    [[NSNotificationCenter defaultCenter] addObserver:self
221c163ad5d9 continue working for team support on the ifrontend
koda
parents: 3250
diff changeset
    42
                                             selector:@selector(dismissModalViewController)
221c163ad5d9 continue working for team support on the ifrontend
koda
parents: 3250
diff changeset
    43
                                                 name: @"dismissModalView" 
221c163ad5d9 continue working for team support on the ifrontend
koda
parents: 3250
diff changeset
    44
                                               object:nil];
3113
2829ea0dd47c * port fadeout to opengles
koda
parents:
diff changeset
    45
2829ea0dd47c * port fadeout to opengles
koda
parents:
diff changeset
    46
	[super viewDidLoad];
2829ea0dd47c * port fadeout to opengles
koda
parents:
diff changeset
    47
}
2829ea0dd47c * port fadeout to opengles
koda
parents:
diff changeset
    48
2829ea0dd47c * port fadeout to opengles
koda
parents:
diff changeset
    49
// this is called to verify whether it's the first time the app is launched
2829ea0dd47c * port fadeout to opengles
koda
parents:
diff changeset
    50
// if it is it blocks user interaction with an alertView until files are created
2829ea0dd47c * port fadeout to opengles
koda
parents:
diff changeset
    51
-(void) checkFirstRun {
2829ea0dd47c * port fadeout to opengles
koda
parents:
diff changeset
    52
	NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
2829ea0dd47c * port fadeout to opengles
koda
parents:
diff changeset
    53
	
2829ea0dd47c * port fadeout to opengles
koda
parents:
diff changeset
    54
	NSString *filePath = [[SDLUIKitDelegate sharedAppDelegate] dataFilePath:@"settings.plist"];
2829ea0dd47c * port fadeout to opengles
koda
parents:
diff changeset
    55
	if (!([[NSFileManager defaultManager] fileExistsAtPath:filePath])) {
2829ea0dd47c * port fadeout to opengles
koda
parents:
diff changeset
    56
		// file not present, means that also other files are absent
2829ea0dd47c * port fadeout to opengles
koda
parents:
diff changeset
    57
		NSLog(@"First time run, creating settings files");
2829ea0dd47c * port fadeout to opengles
koda
parents:
diff changeset
    58
		
2829ea0dd47c * port fadeout to opengles
koda
parents:
diff changeset
    59
		// show a popup with an indicator to make the user wait
3251
221c163ad5d9 continue working for team support on the ifrontend
koda
parents: 3250
diff changeset
    60
		UIAlertView *alert = [[UIAlertView alloc] initWithTitle:NSLocalizedString(@"Please wait",@"")
3113
2829ea0dd47c * port fadeout to opengles
koda
parents:
diff changeset
    61
                                                        message:nil
2829ea0dd47c * port fadeout to opengles
koda
parents:
diff changeset
    62
                                                       delegate:nil
2829ea0dd47c * port fadeout to opengles
koda
parents:
diff changeset
    63
                                              cancelButtonTitle:nil
2829ea0dd47c * port fadeout to opengles
koda
parents:
diff changeset
    64
                                              otherButtonTitles:nil];
2829ea0dd47c * port fadeout to opengles
koda
parents:
diff changeset
    65
		[alert show];
2829ea0dd47c * port fadeout to opengles
koda
parents:
diff changeset
    66
		[alert release];
2829ea0dd47c * port fadeout to opengles
koda
parents:
diff changeset
    67
3251
221c163ad5d9 continue working for team support on the ifrontend
koda
parents: 3250
diff changeset
    68
		UIActivityIndicatorView *indicator = [[UIActivityIndicatorView alloc] 
221c163ad5d9 continue working for team support on the ifrontend
koda
parents: 3250
diff changeset
    69
                                              initWithActivityIndicatorStyle:UIActivityIndicatorViewStyleWhiteLarge];
3113
2829ea0dd47c * port fadeout to opengles
koda
parents:
diff changeset
    70
		indicator.center = CGPointMake(alert.bounds.size.width / 2, alert.bounds.size.height - 50);
2829ea0dd47c * port fadeout to opengles
koda
parents:
diff changeset
    71
		[indicator startAnimating];
2829ea0dd47c * port fadeout to opengles
koda
parents:
diff changeset
    72
		[alert addSubview:indicator];
2829ea0dd47c * port fadeout to opengles
koda
parents:
diff changeset
    73
		[indicator release];
2829ea0dd47c * port fadeout to opengles
koda
parents:
diff changeset
    74
		
3251
221c163ad5d9 continue working for team support on the ifrontend
koda
parents: 3250
diff changeset
    75
        // create Default Team.plist
221c163ad5d9 continue working for team support on the ifrontend
koda
parents: 3250
diff changeset
    76
        NSArray *paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES);
221c163ad5d9 continue working for team support on the ifrontend
koda
parents: 3250
diff changeset
    77
        NSString *teamsDirectory = [[paths objectAtIndex:0] stringByAppendingString:@"Teams/"];
221c163ad5d9 continue working for team support on the ifrontend
koda
parents: 3250
diff changeset
    78
		[[NSFileManager defaultManager] createDirectoryAtPath:teamsDirectory 
221c163ad5d9 continue working for team support on the ifrontend
koda
parents: 3250
diff changeset
    79
                                  withIntermediateDirectories:NO 
221c163ad5d9 continue working for team support on the ifrontend
koda
parents: 3250
diff changeset
    80
                                                   attributes:nil 
221c163ad5d9 continue working for team support on the ifrontend
koda
parents: 3250
diff changeset
    81
                                                        error:NULL];
221c163ad5d9 continue working for team support on the ifrontend
koda
parents: 3250
diff changeset
    82
221c163ad5d9 continue working for team support on the ifrontend
koda
parents: 3250
diff changeset
    83
        NSMutableArray *hedgehogs = [[NSMutableArray alloc] init];
221c163ad5d9 continue working for team support on the ifrontend
koda
parents: 3250
diff changeset
    84
221c163ad5d9 continue working for team support on the ifrontend
koda
parents: 3250
diff changeset
    85
        for (int i = 0; i < 8; i++) {
221c163ad5d9 continue working for team support on the ifrontend
koda
parents: 3250
diff changeset
    86
            NSString *hogName = [[NSString alloc] initWithFormat:@"hedgehog %d",i];
221c163ad5d9 continue working for team support on the ifrontend
koda
parents: 3250
diff changeset
    87
            NSDictionary *hog = [[NSDictionary alloc] initWithObjectsAndKeys:@"100",@"health",@"0",@"level",
221c163ad5d9 continue working for team support on the ifrontend
koda
parents: 3250
diff changeset
    88
                                 hogName,@"hogname",@"NoHat",@"hat",nil];
221c163ad5d9 continue working for team support on the ifrontend
koda
parents: 3250
diff changeset
    89
            [hogName release];
221c163ad5d9 continue working for team support on the ifrontend
koda
parents: 3250
diff changeset
    90
            [hedgehogs addObject:hog];
221c163ad5d9 continue working for team support on the ifrontend
koda
parents: 3250
diff changeset
    91
            [hog release];
221c163ad5d9 continue working for team support on the ifrontend
koda
parents: 3250
diff changeset
    92
        }
221c163ad5d9 continue working for team support on the ifrontend
koda
parents: 3250
diff changeset
    93
        
221c163ad5d9 continue working for team support on the ifrontend
koda
parents: 3250
diff changeset
    94
        NSDictionary *defaultTeam = [[NSDictionary alloc] initWithObjectsAndKeys:@"4421353",@"color",@"0",@"hash",
221c163ad5d9 continue working for team support on the ifrontend
koda
parents: 3250
diff changeset
    95
                                     @"Default Team",@"teamname",@"Statue",@"grave",@"Plane",@"fort",
221c163ad5d9 continue working for team support on the ifrontend
koda
parents: 3250
diff changeset
    96
                                     @"Default",@"voicepack",@"hedgewars",@"flag",hedgehogs,@"hedgehogs",nil];
221c163ad5d9 continue working for team support on the ifrontend
koda
parents: 3250
diff changeset
    97
        [hedgehogs release];
221c163ad5d9 continue working for team support on the ifrontend
koda
parents: 3250
diff changeset
    98
        NSString *defaultTeamFile = [teamsDirectory stringByAppendingString:@"Default Team.plist"];
221c163ad5d9 continue working for team support on the ifrontend
koda
parents: 3250
diff changeset
    99
        [defaultTeam writeToFile:defaultTeamFile atomically:YES];
221c163ad5d9 continue working for team support on the ifrontend
koda
parents: 3250
diff changeset
   100
        [defaultTeam release];
221c163ad5d9 continue working for team support on the ifrontend
koda
parents: 3250
diff changeset
   101
        
3113
2829ea0dd47c * port fadeout to opengles
koda
parents:
diff changeset
   102
		// create settings.plist
2829ea0dd47c * port fadeout to opengles
koda
parents:
diff changeset
   103
		NSMutableDictionary *saveDict = [[NSMutableDictionary alloc] init];
2829ea0dd47c * port fadeout to opengles
koda
parents:
diff changeset
   104
	
2829ea0dd47c * port fadeout to opengles
koda
parents:
diff changeset
   105
		[saveDict setObject:@"" forKey:@"username"];
2829ea0dd47c * port fadeout to opengles
koda
parents:
diff changeset
   106
		[saveDict setObject:@"" forKey:@"password"];
2829ea0dd47c * port fadeout to opengles
koda
parents:
diff changeset
   107
		[saveDict setObject:@"1" forKey:@"music"];
2829ea0dd47c * port fadeout to opengles
koda
parents:
diff changeset
   108
		[saveDict setObject:@"1" forKey:@"sounds"];
2829ea0dd47c * port fadeout to opengles
koda
parents:
diff changeset
   109
		[saveDict setObject:@"0" forKey:@"alternate"];
2829ea0dd47c * port fadeout to opengles
koda
parents:
diff changeset
   110
	
2829ea0dd47c * port fadeout to opengles
koda
parents:
diff changeset
   111
		[saveDict writeToFile:filePath atomically:YES];
2829ea0dd47c * port fadeout to opengles
koda
parents:
diff changeset
   112
		[saveDict release];
2829ea0dd47c * port fadeout to opengles
koda
parents:
diff changeset
   113
		
2829ea0dd47c * port fadeout to opengles
koda
parents:
diff changeset
   114
		// create other files
3251
221c163ad5d9 continue working for team support on the ifrontend
koda
parents: 3250
diff changeset
   115
        
221c163ad5d9 continue working for team support on the ifrontend
koda
parents: 3250
diff changeset
   116
        // ok let the user take control
3113
2829ea0dd47c * port fadeout to opengles
koda
parents:
diff changeset
   117
		[alert dismissWithClickedButtonIndex:0 animated:YES];
2829ea0dd47c * port fadeout to opengles
koda
parents:
diff changeset
   118
	}
2829ea0dd47c * port fadeout to opengles
koda
parents:
diff changeset
   119
	[pool release];
2829ea0dd47c * port fadeout to opengles
koda
parents:
diff changeset
   120
	[NSThread exit];
2829ea0dd47c * port fadeout to opengles
koda
parents:
diff changeset
   121
}
2829ea0dd47c * port fadeout to opengles
koda
parents:
diff changeset
   122
2829ea0dd47c * port fadeout to opengles
koda
parents:
diff changeset
   123
#pragma mark -
2829ea0dd47c * port fadeout to opengles
koda
parents:
diff changeset
   124
-(void) appear {
2829ea0dd47c * port fadeout to opengles
koda
parents:
diff changeset
   125
    [[SDLUIKitDelegate sharedAppDelegate].uiwindow addSubview:self.view];
2829ea0dd47c * port fadeout to opengles
koda
parents:
diff changeset
   126
    [self release];
2829ea0dd47c * port fadeout to opengles
koda
parents:
diff changeset
   127
    
2829ea0dd47c * port fadeout to opengles
koda
parents:
diff changeset
   128
    [UIView beginAnimations:@"inserting main controller" context:NULL];
2829ea0dd47c * port fadeout to opengles
koda
parents:
diff changeset
   129
	[UIView setAnimationDuration:1];
2829ea0dd47c * port fadeout to opengles
koda
parents:
diff changeset
   130
	self.view.alpha = 1;
2829ea0dd47c * port fadeout to opengles
koda
parents:
diff changeset
   131
	[UIView commitAnimations];
3122
e005359efc59 hide the background gl context that remains active (might be worth freeing ithide the background gl context that remains active (might be worth freeing it))
koda
parents: 3113
diff changeset
   132
    
3165
3ec07a7d8456 just some very sane stuff for the iphone port (plus some macro on pascal files)
koda
parents: 3122
diff changeset
   133
    [NSTimer scheduledTimerWithTimeInterval:0.7 target:self selector:@selector(hideBehind) userInfo:nil repeats:NO];
3113
2829ea0dd47c * port fadeout to opengles
koda
parents:
diff changeset
   134
}
2829ea0dd47c * port fadeout to opengles
koda
parents:
diff changeset
   135
2829ea0dd47c * port fadeout to opengles
koda
parents:
diff changeset
   136
-(void) disappear {
3122
e005359efc59 hide the background gl context that remains active (might be worth freeing ithide the background gl context that remains active (might be worth freeing it))
koda
parents: 3113
diff changeset
   137
    if (nil != cover)
e005359efc59 hide the background gl context that remains active (might be worth freeing ithide the background gl context that remains active (might be worth freeing it))
koda
parents: 3113
diff changeset
   138
        [cover release];
e005359efc59 hide the background gl context that remains active (might be worth freeing ithide the background gl context that remains active (might be worth freeing it))
koda
parents: 3113
diff changeset
   139
    
3113
2829ea0dd47c * port fadeout to opengles
koda
parents:
diff changeset
   140
    [UIView beginAnimations:@"removing main controller" context:NULL];
2829ea0dd47c * port fadeout to opengles
koda
parents:
diff changeset
   141
	[UIView setAnimationDuration:1];
2829ea0dd47c * port fadeout to opengles
koda
parents:
diff changeset
   142
	self.view.alpha = 0;
2829ea0dd47c * port fadeout to opengles
koda
parents:
diff changeset
   143
	[UIView commitAnimations];
2829ea0dd47c * port fadeout to opengles
koda
parents:
diff changeset
   144
    
2829ea0dd47c * port fadeout to opengles
koda
parents:
diff changeset
   145
    [self retain];
2829ea0dd47c * port fadeout to opengles
koda
parents:
diff changeset
   146
    [self.view removeFromSuperview];
2829ea0dd47c * port fadeout to opengles
koda
parents:
diff changeset
   147
}
2829ea0dd47c * port fadeout to opengles
koda
parents:
diff changeset
   148
3165
3ec07a7d8456 just some very sane stuff for the iphone port (plus some macro on pascal files)
koda
parents: 3122
diff changeset
   149
// this is a silly way to hide the sdl contex that remained active
3ec07a7d8456 just some very sane stuff for the iphone port (plus some macro on pascal files)
koda
parents: 3122
diff changeset
   150
-(void) hideBehind {
3ec07a7d8456 just some very sane stuff for the iphone port (plus some macro on pascal files)
koda
parents: 3122
diff changeset
   151
    if (nil == cover) {
3ec07a7d8456 just some very sane stuff for the iphone port (plus some macro on pascal files)
koda
parents: 3122
diff changeset
   152
        cover= [[UIView alloc] initWithFrame:[[UIScreen mainScreen] bounds]];
3ec07a7d8456 just some very sane stuff for the iphone port (plus some macro on pascal files)
koda
parents: 3122
diff changeset
   153
        cover.backgroundColor = [UIColor blackColor];
3ec07a7d8456 just some very sane stuff for the iphone port (plus some macro on pascal files)
koda
parents: 3122
diff changeset
   154
    }
3ec07a7d8456 just some very sane stuff for the iphone port (plus some macro on pascal files)
koda
parents: 3122
diff changeset
   155
    [[SDLUIKitDelegate sharedAppDelegate].uiwindow insertSubview:cover belowSubview:self.view];
3ec07a7d8456 just some very sane stuff for the iphone port (plus some macro on pascal files)
koda
parents: 3122
diff changeset
   156
}
3ec07a7d8456 just some very sane stuff for the iphone port (plus some macro on pascal files)
koda
parents: 3122
diff changeset
   157
3113
2829ea0dd47c * port fadeout to opengles
koda
parents:
diff changeset
   158
#pragma mark -
2829ea0dd47c * port fadeout to opengles
koda
parents:
diff changeset
   159
-(IBAction) switchViews:(id) sender {
2829ea0dd47c * port fadeout to opengles
koda
parents:
diff changeset
   160
    UIButton *button = (UIButton *)sender;
2829ea0dd47c * port fadeout to opengles
koda
parents:
diff changeset
   161
    SplitViewRootController *splitViewController;
2829ea0dd47c * port fadeout to opengles
koda
parents:
diff changeset
   162
    UIAlertView *alert;
2829ea0dd47c * port fadeout to opengles
koda
parents:
diff changeset
   163
    
2829ea0dd47c * port fadeout to opengles
koda
parents:
diff changeset
   164
    switch (button.tag) {
2829ea0dd47c * port fadeout to opengles
koda
parents:
diff changeset
   165
        case 0:
2829ea0dd47c * port fadeout to opengles
koda
parents:
diff changeset
   166
            [[SDLUIKitDelegate sharedAppDelegate] startSDLgame];
2829ea0dd47c * port fadeout to opengles
koda
parents:
diff changeset
   167
            break;
2829ea0dd47c * port fadeout to opengles
koda
parents:
diff changeset
   168
        case 2:
2829ea0dd47c * port fadeout to opengles
koda
parents:
diff changeset
   169
            // for now this controller is just to simplify code management
3270
9bd8fb1707b9 initial support for hat selection on the ifrontend
koda
parents: 3251
diff changeset
   170
            splitViewController = [[SplitViewRootController alloc] initWithNibName:nil bundle:nil];
3113
2829ea0dd47c * port fadeout to opengles
koda
parents:
diff changeset
   171
            splitViewController.modalTransitionStyle = UIModalTransitionStyleFlipHorizontal;
2829ea0dd47c * port fadeout to opengles
koda
parents:
diff changeset
   172
            [self presentModalViewController:splitViewController animated:YES];
2829ea0dd47c * port fadeout to opengles
koda
parents:
diff changeset
   173
            break;
2829ea0dd47c * port fadeout to opengles
koda
parents:
diff changeset
   174
        default:
2829ea0dd47c * port fadeout to opengles
koda
parents:
diff changeset
   175
            alert = [[UIAlertView alloc] initWithTitle:@"Not Yet Implemented"
2829ea0dd47c * port fadeout to opengles
koda
parents:
diff changeset
   176
                                               message:@"Sorry, this feature is not yet implemented"
2829ea0dd47c * port fadeout to opengles
koda
parents:
diff changeset
   177
                                              delegate:nil
2829ea0dd47c * port fadeout to opengles
koda
parents:
diff changeset
   178
                                     cancelButtonTitle:@"Well, don't worry"
2829ea0dd47c * port fadeout to opengles
koda
parents:
diff changeset
   179
                                     otherButtonTitles:nil];
2829ea0dd47c * port fadeout to opengles
koda
parents:
diff changeset
   180
            [alert show];
2829ea0dd47c * port fadeout to opengles
koda
parents:
diff changeset
   181
            [alert release];
2829ea0dd47c * port fadeout to opengles
koda
parents:
diff changeset
   182
            break;
2829ea0dd47c * port fadeout to opengles
koda
parents:
diff changeset
   183
    }
2829ea0dd47c * port fadeout to opengles
koda
parents:
diff changeset
   184
}
2829ea0dd47c * port fadeout to opengles
koda
parents:
diff changeset
   185
2829ea0dd47c * port fadeout to opengles
koda
parents:
diff changeset
   186
-(void) dismissModalViewController {
2829ea0dd47c * port fadeout to opengles
koda
parents:
diff changeset
   187
    [self dismissModalViewControllerAnimated:YES];
2829ea0dd47c * port fadeout to opengles
koda
parents:
diff changeset
   188
}
2829ea0dd47c * port fadeout to opengles
koda
parents:
diff changeset
   189
2829ea0dd47c * port fadeout to opengles
koda
parents:
diff changeset
   190
@end