cocoaTouch/MainMenuViewController.m
author koda
Sun, 10 Jan 2010 00:52:20 +0000
changeset 2691 c0da3a98c01c
parent 2687 28b8330b8af1
child 2694 dcd248e04f3d
permissions -rw-r--r--
initial support for engine protocol

//
//  MainMenuViewController.m
//  hwengine
//
//  Created by Vittorio on 08/01/10.
//  Copyright 2010 __MyCompanyName__. All rights reserved.
//

#import "MainMenuViewController.h"
#import "SDL_uikitappdelegate.h"

@implementation MainMenuViewController

@synthesize passandplayButton, netplayButton, storeButton, versionLabel;

/*
 // The designated initializer.  Override if you create the controller programmatically and want to perform customization that is not appropriate for viewDidLoad.
- (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil {
    if (self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil]) {
        // Custom initialization
    }
    return self;
}
*/


// Implement viewDidLoad to do additional setup after loading the view, typically from a nib.
-(void) viewDidLoad {
	self.versionLabel = @"Hedgewars version 0.9.13-dev";
    [super viewDidLoad];
}

/*
// Override to allow orientations other than the default portrait orientation.
- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation {
    // Return YES for supported orientations
    return (interfaceOrientation == UIInterfaceOrientationPortrait);
}
*/

- (void)didReceiveMemoryWarning {
	// Releases the view if it doesn't have a superview.
    [super didReceiveMemoryWarning];
	
	// Release any cached data, images, etc that aren't in use.
}

- (void)viewDidUnload {
	// Release any retained subviews of the main view.
	self.passandplayButton = nil;
	self.netplayButton = nil;
	self.storeButton = nil;
	self.versionLabel = nil;
}

- (void)dealloc {
	[passandplayButton release];
	[netplayButton release];
	[storeButton release];
	[versionLabel release];
    [super dealloc];
}

-(IBAction) startPlaying {
	// TODO: support IPC and start a thread
	
	[[SDLUIKitDelegate sharedAppDelegate] startSDLgame];
}

-(IBAction) notYetImplemented {
	UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@"Not Yet Implemented"
									message:@"Sorry, this feature is not yet implemented"
									delegate:nil
									cancelButtonTitle:@"Well, don't worry"
									otherButtonTitles:nil];
	[alert show];
	[alert release];
}

@end