Skip to content

Commit

Permalink
added mouse click control for threshold
Browse files Browse the repository at this point in the history
  • Loading branch information
elliotwoods committed Aug 19, 2012
1 parent 6747b85 commit 2cca533
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/testApp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,10 @@ void testApp::draw(){

ofPopMatrix();
float y = 20;
ofDrawBitmapString("Press [SPACE] to reset recording", 20, y+=10);
ofDrawBitmapString("Press [s] to toggle sine signal generator [" + string(useSine ? "x" : " ") + "]", 20, y+=10);
ofDrawBitmapString("Press [SPACE] to reset recording", 20, y+=15);
ofDrawBitmapString("Press [s] to toggle sine signal generator [" + string(useSine ? "x" : " ") + "]", 20, y+=15);

ofDrawBitmapString("Click somewhere in the x direction to set the threshold [" + ofToString(recordTrace.getThreshold()) + "]", 20, y+=15);
}

//--------------------------------------------------------------
Expand Down Expand Up @@ -86,7 +88,7 @@ void testApp::mouseDragged(int x, int y, int button){

//--------------------------------------------------------------
void testApp::mousePressed(int x, int y, int button){

recordTrace.setThreshold(float(x) / ofGetWidth() * 0.3f);
}

//--------------------------------------------------------------
Expand Down

0 comments on commit 2cca533

Please sign in to comment.