istereo
view src/ui.m @ 35:23e5d274b2a2
added options panel, also added the xib files to the repository as they're needed
author | John Tsiombikas <nuclear@member.fsf.org> |
---|---|
date | Fri, 09 Sep 2011 10:03:42 +0300 |
parents | |
children | 834503dcb486 |
line source
1 #import "ui.h"
3 extern int stereo;
4 extern int use_bump;
5 extern float split;
8 @implementation UI
10 @synthesize bn_done;
11 @synthesize slider_split;
12 @synthesize grp_mode;
13 @synthesize sw_stereo;
15 // The designated initializer. Override if you create the controller programmatically and want to perform customization that is not appropriate for viewDidLoad.
16 /*
17 - (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil
18 {
19 self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil];
20 if(self) {
21 }
22 return self;
23 }*/
26 // Implement viewDidLoad to do additional setup after loading the view, typically from a nib.
27 - (void)viewDidLoad
28 {
29 [super viewDidLoad];
31 [slider_split setValue: 1.0 - split];
32 sw_stereo.on = stereo ? YES : NO;
33 grp_mode.selectedSegmentIndex = use_bump ? 1 : 0;
34 }
37 // Override to allow orientations other than the default portrait orientation.
38 - (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation {
39 // Return YES for supported orientations.
40 return interfaceOrientation == UIInterfaceOrientationLandscapeRight;
41 }
44 - (void)didReceiveMemoryWarning {
45 // Releases the view if it doesn't have a superview.
46 [super didReceiveMemoryWarning];
48 // Release any cached data, images, etc. that aren't in use.
49 }
51 - (void)viewDidUnload {
52 [super viewDidUnload];
53 // Release any retained subviews of the main view.
54 // e.g. self.myOutlet = nil;
55 }
58 - (void)dealloc {
59 [super dealloc];
60 }
62 -(IBAction) done_clicked: (id) sender
63 {
64 self.view.hidden = YES;
65 }
67 -(IBAction) split_changed: (id) sender
68 {
69 split = 1.0 - slider_split.value;
70 }
72 -(IBAction) stereo_changed: (id) sender
73 {
74 stereo = sw_stereo.on;
75 }
77 -(IBAction) mode_changed: (id) sender
78 {
79 use_bump = grp_mode.selectedSegmentIndex;
80 }
83 @end