Mercurial > hg > soniczoomios
diff SliderViewController.mm @ 44:a1e75b94c505
Snap to eval points. Double tap to go to preset (doesn't quite work yet). Coloured locks. Changed Question 2. Fixed some leaks.
author | Robert Tubb <rt300@eecs.qmul.ac.uk> |
---|---|
date | Mon, 22 Apr 2013 18:32:34 +0100 |
parents | b91a1859829a |
children | c2fffc8ea84d |
line wrap: on
line diff
--- a/SliderViewController.mm Fri Apr 19 18:50:04 2013 +0100 +++ b/SliderViewController.mm Mon Apr 22 18:32:34 2013 +0100 @@ -30,8 +30,8 @@ - (void)viewDidLoad { int left = 22; - int top = 3; - const int height = 62; + int top = 10; + const int height = 50; const int width = 337; [super viewDidLoad]; @@ -39,7 +39,7 @@ for(int i=0;i<10;i++){ if(i==5){ - top = 0; + top = 10; left = left*3 + width; } SliderController * sliderV = [[SliderController alloc] initWithNibName:@"SliderController" bundle:nil delegate:self pID:i]; @@ -51,6 +51,9 @@ NSLog(@"setting name to %@", self.paramNames[i]); [sliderV changeLabel:self.paramNames[i] ]; [sliderV setParamValue:44]; + if(i>=5){ + [sliderV makeRed]; + } top += height; [self.sliderArray addObject:sliderV]; // not working @@ -96,7 +99,6 @@ ((testApp *)self.theOFAppRef)->sliderMoved(which,value); } - (void)setSlider:(int)which to:(float)value{ - NSLog(@"set slider to"); [[self.sliderArray objectAtIndex:which] setParamValue:value]; } - (void)populateParamNames{