# HG changeset patch # User Robert Tubb # Date 1413992831 -3600 # Node ID 1e6d4ece1572d4b4467c1973e38337319ce301b0 # Parent bd23c1b922be71f774fb8049e1ffe0633db5d4f1 intro screen with mode options. seems to work. diff -r bd23c1b922be -r 1e6d4ece1572 IntroViewController.mm --- a/IntroViewController.mm Wed Oct 22 16:29:31 2014 +0100 +++ b/IntroViewController.mm Wed Oct 22 16:47:11 2014 +0100 @@ -39,6 +39,15 @@ self.theOFAppRef = theOFApp; } +- (IBAction)enterExpMode:(id)sender { + ((testApp *)self.theOFAppRef)->introHidden(1); +} +- (IBAction)enterTrainMode:(id)sender { + ((testApp *)self.theOFAppRef)->introHidden(2); +} +- (IBAction)enterSearchMode:(id)sender { + ((testApp *)self.theOFAppRef)->introHidden(3); +} - (IBAction)show:(id)sender { @@ -48,14 +57,14 @@ - (IBAction)hide:(id)sender { self.view.hidden = YES; - ((testApp *)self.theOFAppRef)->introHidden(); + } - (IBAction)disagree:(id)sender { // shut down the app self.view.hidden = YES; - ((testApp *)self.theOFAppRef)->introHidden(); + ((testApp *)self.theOFAppRef)->introHidden(0); } - (void)dealloc { [_text release]; diff -r bd23c1b922be -r 1e6d4ece1572 IntroViewController.xib --- a/IntroViewController.xib Wed Oct 22 16:29:31 2014 +0100 +++ b/IntroViewController.xib Wed Oct 22 16:47:11 2014 +0100 @@ -1,8 +1,8 @@ - + - + @@ -17,20 +17,44 @@ - \ No newline at end of file + diff -r bd23c1b922be -r 1e6d4ece1572 UI code/IconPanel.mm --- a/UI code/IconPanel.mm Wed Oct 22 16:29:31 2014 +0100 +++ b/UI code/IconPanel.mm Wed Oct 22 16:47:11 2014 +0100 @@ -56,7 +56,7 @@ void IconPanel::drawTick(){ ofPoint pos(x + width - 25, y + height - 25); ofSetColor(0, 200, 20); - ofSetLineWidth(2); + ofSetLineWidth(3); ofLine(pos.x, pos.y, pos.x+8, pos.y+10); ofLine(pos.x+8, pos.y+10, pos.x+10, pos.y+8); } @@ -64,7 +64,7 @@ void IconPanel::drawCross(){ ofPoint pos(x + width - 25, y + height - 25); ofSetColor(230, 0, 20); - ofSetLineWidth(2); + ofSetLineWidth(3); ofLine(pos.x, pos.y, pos.x+10, pos.y+10); ofLine(pos.x+10, pos.y, pos.x, pos.y+10); } diff -r bd23c1b922be -r 1e6d4ece1572 testApp.h --- a/testApp.h Wed Oct 22 16:29:31 2014 +0100 +++ b/testApp.h Wed Oct 22 16:47:11 2014 +0100 @@ -116,7 +116,7 @@ void questionnaireHidden(vector answers, const char* userComments); void showIntro(); - void introHidden(); + void introHidden(int mode); void usernameEntered(); void startTheSearchTests(); void startTheTrainingTests(); diff -r bd23c1b922be -r 1e6d4ece1572 testApp.mm --- a/testApp.mm Wed Oct 22 16:29:31 2014 +0100 +++ b/testApp.mm Wed Oct 22 16:47:11 2014 +0100 @@ -56,7 +56,7 @@ }else{ // then we're in timed session mode - showIntro(); + [usernameAlertViewController showUserNamePrompt]; } } paused = false; @@ -386,7 +386,8 @@ //-------------------------------------------------------------- void testApp::showIntro(){ - + // display a thing that gives us an option as to which stage to start + // EXPLORE, PERFORMANCE TRAINING, SEARCH cout << "SHOW INTRO\n"; introViewController = [[IntroViewController alloc] initWithNibName:@"IntroViewController" bundle:nil]; @@ -399,20 +400,33 @@ } //-------------------------------------------------------------- -void testApp::introHidden(){ +//void testApp::introHidden(){ +// eventLogger.consentGiven = true; +// eventLogger.logEvent(INTRO_CONSENTED); +// [usernameAlertViewController showUserNamePrompt]; +// // after prompt goes it calls usernameEntered() +//} +//-------------------------------------------------------------- +void testApp::introHidden(int mode){ eventLogger.consentGiven = true; eventLogger.logEvent(INTRO_CONSENTED); - [usernameAlertViewController showUserNamePrompt]; - // after prompt goes it calls usernameEntered() + + if(mode == 1){ + startTheExpTests(); + }else if(mode == 2){ + startTheTrainingTests(); + }else if(mode == 3){ + startTheSearchTests(); + } + } +//-------------------------------------------------------------- +void testApp::usernameEntered(){ -void testApp::usernameEntered(){ - // display a thing that gives us an option as to which stage to start - // EXPLORE, PERFORMANCE TRAINING, SEARCH eventLogger.onUsernameEntered(); expPresetManager.onAppLoad(); - startTheExpTests(); + showIntro(); } //--------------------------------------------------------------