|
1 // |
|
2 // MainMenuViewController.m |
|
3 // hwengine |
|
4 // |
|
5 // Created by Vittorio on 08/01/10. |
|
6 // Copyright 2010 __MyCompanyName__. All rights reserved. |
|
7 // |
|
8 |
|
9 #import "MainMenuViewController.h" |
|
10 #import "SDL_uikitappdelegate.h" |
|
11 |
|
12 @implementation MainMenuViewController |
|
13 |
|
14 @synthesize passandplayButton, netplayButton, storeButton, versionLabel; |
|
15 |
|
16 /* |
|
17 // The designated initializer. Override if you create the controller programmatically and want to perform customization that is not appropriate for viewDidLoad. |
|
18 - (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil { |
|
19 if (self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil]) { |
|
20 // Custom initialization |
|
21 } |
|
22 return self; |
|
23 } |
|
24 */ |
|
25 |
|
26 |
|
27 // Implement viewDidLoad to do additional setup after loading the view, typically from a nib. |
|
28 - (void)viewDidLoad { |
|
29 self.versionLabel = @"Hedgewar version 0.9.13-dev"; |
|
30 [super viewDidLoad]; |
|
31 } |
|
32 |
|
33 |
|
34 /* |
|
35 // Override to allow orientations other than the default portrait orientation. |
|
36 - (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation { |
|
37 // Return YES for supported orientations |
|
38 return (interfaceOrientation == UIInterfaceOrientationPortrait); |
|
39 } |
|
40 */ |
|
41 |
|
42 - (void)didReceiveMemoryWarning { |
|
43 // Releases the view if it doesn't have a superview. |
|
44 [super didReceiveMemoryWarning]; |
|
45 |
|
46 // Release any cached data, images, etc that aren't in use. |
|
47 } |
|
48 |
|
49 - (void)viewDidUnload { |
|
50 // Release any retained subviews of the main view. |
|
51 // e.g. self.myOutlet = nil; |
|
52 self.passandplayButton = nil; |
|
53 self.netplayButton = nil; |
|
54 self.storeButton = nil; |
|
55 self.versionLabel = nil; |
|
56 } |
|
57 |
|
58 - (void)dealloc { |
|
59 [passandplayButton release]; |
|
60 [netplayButton release]; |
|
61 [storeButton release]; |
|
62 [versionLabel release]; |
|
63 [super dealloc]; |
|
64 } |
|
65 |
|
66 -(IBAction) startPlaying { |
|
67 [[SDLUIKitDelegate sharedAppDelegate] startSDLgame]; |
|
68 } |
|
69 @end |