1
0
mirror of https://github.com/thes3m/XNI synced 2024-12-26 13:26:06 +01:00
XNI/Classes/Retronator/Xni/Framework/GameViewController.m
Matej Jan e8b63f4208 Added initial window handling.
git-svn-id: http://xni.googlecode.com/svn/XNI@7 ac433895-eea3-a490-d80a-17149a75e588
2010-07-22 16:13:55 +00:00

74 lines
1.9 KiB
Objective-C

//
// GameViewController.m
// XNI
//
// Created by Matej Jan on 22.7.10.
// Copyright 2010 Retronator, Razum. All rights reserved.
//
#import "GameViewController.h"
#import "Retronator.Xni.Framework.h"
@implementation GameViewController
- initWithGameWindow: (GameWindow*)theGameWindow {
if (self = [super init]) {
gameWindow = theGameWindow;
}
return self;
}
- (void)loadView {
GameView *gameView = [[GameView alloc] initWithFrame:[UIScreen mainScreen].applicationFrame];
self.view = gameView;
[gameView release];
}
- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation {
//InterfaceOrientationFlags orientationFlag = 1 << interfaceOrientation;
return YES;// gameWindow.allowedOrientations & orientationFlag;
}
- (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.
// e.g. self.myOutlet = nil;
}
// Touches
/*
- (void) touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event {
[[MultiTouch instance].touchesBegan fireWithSender:self eventArgs:[TouchEventArgs argsWithTouches:touches event:event]];
}
- (void) touchesMoved:(NSSet *)touches withEvent:(UIEvent *)event {
[[MultiTouch instance].touchesMoved fireWithSender:self eventArgs:[TouchEventArgs argsWithTouches:touches event:event]];
}
- (void) touchesEnded:(NSSet *)touches withEvent:(UIEvent *)event {
[[MultiTouch instance].touchesEnded fireWithSender:self eventArgs:[TouchEventArgs argsWithTouches:touches event:event]];
}
- (void) touchesCancelled:(NSSet *)touches withEvent:(UIEvent *)event {
[[MultiTouch instance].touchesCancelled fireWithSender:self eventArgs:[TouchEventArgs argsWithTouches:touches event:event]];
}*/
- (void)dealloc {
[super dealloc];
}
@end