nuclear@35: #import "ui.h" nuclear@35: nuclear@35: extern int stereo; nuclear@35: extern int use_bump; nuclear@35: extern float split; nuclear@35: nuclear@35: nuclear@35: @implementation UI nuclear@35: nuclear@35: @synthesize bn_done; nuclear@35: @synthesize slider_split; nuclear@35: @synthesize grp_mode; nuclear@35: @synthesize sw_stereo; nuclear@35: nuclear@35: // The designated initializer. Override if you create the controller programmatically and want to perform customization that is not appropriate for viewDidLoad. nuclear@35: /* nuclear@35: - (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil nuclear@35: { nuclear@35: self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil]; nuclear@35: if(self) { nuclear@35: } nuclear@35: return self; nuclear@35: }*/ nuclear@35: nuclear@35: nuclear@35: // Implement viewDidLoad to do additional setup after loading the view, typically from a nib. nuclear@35: - (void)viewDidLoad nuclear@35: { nuclear@35: [super viewDidLoad]; nuclear@35: nuclear@36: self.view.center = CGPointMake(160, 240); nuclear@36: self.view.transform = CGAffineTransformMakeRotation(M_PI / 2.0); nuclear@36: nuclear@35: [slider_split setValue: 1.0 - split]; nuclear@35: sw_stereo.on = stereo ? YES : NO; nuclear@35: grp_mode.selectedSegmentIndex = use_bump ? 1 : 0; nuclear@35: } nuclear@35: nuclear@35: nuclear@35: // Override to allow orientations other than the default portrait orientation. nuclear@36: /*- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation { nuclear@35: // Return YES for supported orientations. nuclear@35: return interfaceOrientation == UIInterfaceOrientationLandscapeRight; nuclear@36: }*/ nuclear@35: nuclear@35: nuclear@35: - (void)didReceiveMemoryWarning { nuclear@35: // Releases the view if it doesn't have a superview. nuclear@35: [super didReceiveMemoryWarning]; nuclear@35: nuclear@35: // Release any cached data, images, etc. that aren't in use. nuclear@35: } nuclear@35: nuclear@35: - (void)viewDidUnload { nuclear@35: [super viewDidUnload]; nuclear@35: // Release any retained subviews of the main view. nuclear@35: // e.g. self.myOutlet = nil; nuclear@35: } nuclear@35: nuclear@35: nuclear@35: - (void)dealloc { nuclear@35: [super dealloc]; nuclear@35: } nuclear@35: nuclear@35: -(IBAction) done_clicked: (id) sender nuclear@35: { nuclear@35: self.view.hidden = YES; nuclear@35: } nuclear@35: nuclear@35: -(IBAction) split_changed: (id) sender nuclear@35: { nuclear@35: split = 1.0 - slider_split.value; nuclear@35: } nuclear@35: nuclear@35: -(IBAction) stereo_changed: (id) sender nuclear@35: { nuclear@35: stereo = sw_stereo.on; nuclear@35: } nuclear@35: nuclear@35: -(IBAction) mode_changed: (id) sender nuclear@35: { nuclear@35: use_bump = grp_mode.selectedSegmentIndex; nuclear@35: } nuclear@35: nuclear@35: nuclear@35: @end