view IntroViewController.mm @ 28:953db6518738

leap version more or less there, needs btter results feedback but thats detail. "no movement" bit is stupid cos peopel can move their hand. light flash not work.
author Robert Tubb <rt300@eecs.qmul.ac.uk>
date Thu, 30 Oct 2014 18:35:00 +0000
parents 27cdf475aa4b
children 75202498bee9
line wrap: on
line source
//
//  IntroViewController.m
//  sonicZoom
//
//  Created by Robert Tubb on 29/01/2013.
//
//

#import "IntroViewController.h"
#import "testApp.h"
@interface IntroViewController ()



@end

@implementation IntroViewController

- (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil
{
    self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil];
    if (self) {
        // Custom initialization
        self.interfaceSelection = 0;
    }
    return self;
}

- (void)viewDidLoad
{
    [super viewDidLoad];
    // Do any additional setup after loading the view from its nib.
}
- (IBAction)oninterfaceSelect:(id)sender {
    UISegmentedControl *seg = (UISegmentedControl *)sender;
    self.interfaceSelection = seg.selectedSegmentIndex;


}

- (void)didReceiveMemoryWarning
{
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

- (void)setAppRef:(id)theOFApp{
    self.theOFAppRef = theOFApp;
    
}
- (IBAction)enterExpMode:(id)sender {
    ((testApp *)self.theOFAppRef)->interfaceSelected(self.interfaceSelection);
    ((testApp *)self.theOFAppRef)->introHidden(1);
}
- (IBAction)enterTrainMode:(id)sender {
    ((testApp *)self.theOFAppRef)->interfaceSelected(self.interfaceSelection);
    ((testApp *)self.theOFAppRef)->introHidden(2);
}
- (IBAction)enterSearchMode:(id)sender {
    ((testApp *)self.theOFAppRef)->interfaceSelected(self.interfaceSelection);
    ((testApp *)self.theOFAppRef)->introHidden(3);
}

- (IBAction)show:(id)sender
{
    self.theOFAppRef = sender;
    self.view.hidden = NO;
}
- (IBAction)hide:(id)sender
{
    self.view.hidden = YES;
    
    
}
- (IBAction)disagree:(id)sender
{
    // shut down the app
    self.view.hidden = YES;
    ((testApp *)self.theOFAppRef)->introHidden(0);
}
- (void)dealloc {
    [_text release];
    [super dealloc];
}
- (void)viewDidUnload {
    [self setText:nil];
    [super viewDidUnload];
}
@end