diff options
| author | Tim Redfern <tim@getdrop.com> | 2018-06-22 07:58:04 +0100 |
|---|---|---|
| committer | Tim Redfern <tim@getdrop.com> | 2018-06-22 07:58:04 +0100 |
| commit | 54a6478fcdeaadc12c753adf73b171979808fd9e (patch) | |
| tree | 21ea1dd17a4e5a8cd3516d1ddc6eaeac1f6a54af /gui/src/ofApp.h | |
| parent | 875fb2f138af8472595aa6de9f5de99e3ffe30ff (diff) | |
working on gui
Diffstat (limited to 'gui/src/ofApp.h')
| -rw-r--r-- | gui/src/ofApp.h | 38 |
1 files changed, 35 insertions, 3 deletions
diff --git a/gui/src/ofApp.h b/gui/src/ofApp.h index 24ab46e..41418b3 100644 --- a/gui/src/ofApp.h +++ b/gui/src/ofApp.h @@ -37,6 +37,31 @@ enum Source{ }; +class mouseSelectPanel : public ofxPanel { + public: + bool isSelected; + bool mouseMoved(ofMouseEventArgs & args){ + if (args.x>getPosition().x&& + args.x-getPosition().x<getWidth()&& + args.y>getPosition().y&& + args.y-getPosition().y<getHeight()){ + if (!isSelected){ + isSelected=true; + setBorderColor(ofColor(128,64,0)); + //ofLog()<<"IN> "<<args.x<<","<<args.y; + } + } + else { + if (isSelected){ + isSelected=false; + setBorderColor(ofColor(0,0,0)); + //ofLog()<<"OUT> "<<args.x<<","<<args.y; + } + } + } +}; + + class ofApp: public ofBaseApp, public ofxMidiListener { public: @@ -56,6 +81,8 @@ class ofApp: public ofBaseApp, public ofxMidiListener { void windowResized(int w, int h); void dragEvent(ofDragInfo dragInfo); + void lMouseMoved(ofMouseEventArgs & args); //mouseMoved listener + void newMidiMessage(ofxMidiMessage& eventArgs); void updateOutput(ofEventArgs & args); @@ -110,7 +137,7 @@ class ofApp: public ofBaseApp, public ofxMidiListener { //======== audio gui ofxPanel audiogui; - ofParameter<bool> useMic; + ofParameter<bool> useMic; ofParameter<bool> useFft; ofParameter<float> scalePlot; ofParameter<float> decayPlot; @@ -129,8 +156,13 @@ class ofApp: public ofBaseApp, public ofxMidiListener { //======== chaos gui - ofxPanel chaosgui; - + mouseSelectPanel chaosgui; + ofxLabel plugin_label; + ofParameter<string> plugin_name; + + // best architecture for the chaos plugin? + // how to use it on an arbitrary set of data + // should it be a part of the audio plotter? //======================================== //thresholding |
