diff TopButtonViewController.mm @ 38:0dfe9e0c01aa

Evnt trails fit with uploads. Smooth button.
author Robert Tubb <rt300@eecs.qmul.ac.uk>
date Wed, 10 Apr 2013 18:57:05 +0100
parents 8ed7522deaaa
children df7c08faf541
line wrap: on
line diff
--- a/TopButtonViewController.mm	Tue Apr 09 17:14:31 2013 +0100
+++ b/TopButtonViewController.mm	Wed Apr 10 18:57:05 2013 +0100
@@ -134,12 +134,28 @@
     ((testApp *)self.theOFAppRef)->nextSequence();
 }
 
+- (IBAction)smoothSwitchChanged:(id)sender {
+    UISwitch * smoothswitch = (UISwitch *)sender;
+    NSLog(@"SMOOTH SWITCH %d", smoothswitch.on);
+    ((testApp *)self.theOFAppRef)->setInterp(smoothswitch.on);
+    
+    if(smoothswitch.on){
+        self.savePresetButton.enabled = NO;
+       
+    }else{
+        self.savePresetButton.enabled = YES;
+    }
+}
+
 - (IBAction)show:(id)sender
 {
     self.theOFAppRef = sender;
     self.view.hidden = NO;
 }
-
+- (void)enableSmoothSwitch:(id)sender{
+    self.smoothToggle.hidden = NO;
+    self.smoothText.hidden = NO;
+}
 /*
  helpViewController	= [[HelpViewController alloc] initWithNibName:@"HelpViewController" bundle:nil];
  [ofxiPhoneGetGLParentView() addSubview:helpViewController.view];
@@ -151,6 +167,10 @@
     [_qButton release];
 
     [_newUserButton release];
+    [_smoothText release];
+    [_smoothSwitch release];
+    [_smoothToggle release];
+    [_savePresetButton release];
     [super dealloc];
 }
 - (void)viewDidUnload {
@@ -158,6 +178,10 @@
     [self setPauseButton:nil];
     [self setQButton:nil];
     [self setNewUserButton:nil];
+    [self setSmoothText:nil];
+    [self setSmoothSwitch:nil];
+    [self setSmoothToggle:nil];
+    [self setSavePresetButton:nil];
     [super viewDidUnload];
 }
 @end