summaryrefslogtreecommitdiff
path: root/gui/src/ofApp.h
diff options
context:
space:
mode:
Diffstat (limited to 'gui/src/ofApp.h')
-rw-r--r--gui/src/ofApp.h26
1 files changed, 23 insertions, 3 deletions
diff --git a/gui/src/ofApp.h b/gui/src/ofApp.h
index 41418b3..29c6929 100644
--- a/gui/src/ofApp.h
+++ b/gui/src/ofApp.h
@@ -39,6 +39,9 @@ enum Source{
class mouseSelectPanel : public ofxPanel {
public:
+ mouseSelectPanel(){
+ ofRegisterKeyEvents(this, defaultEventsPriority);
+ }
bool isSelected;
bool mouseMoved(ofMouseEventArgs & args){
if (args.x>getPosition().x&&
@@ -47,7 +50,7 @@ class mouseSelectPanel : public ofxPanel {
args.y-getPosition().y<getHeight()){
if (!isSelected){
isSelected=true;
- setBorderColor(ofColor(128,64,0));
+ setBorderColor(ofColor(255,128,0));
//ofLog()<<"IN> "<<args.x<<","<<args.y;
}
}
@@ -59,6 +62,25 @@ class mouseSelectPanel : public ofxPanel {
}
}
}
+ bool keyPressed(ofKeyEventArgs & args){
+ if (isSelected){
+ //ofLog()<<"KEY> "<<args.key;
+ switch(args.key){
+ case 3812:{
+ //previous
+ break;
+ }
+ case 3814:{
+ //next
+ }
+ }
+ }
+ }
+ bool keyReleased(ofKeyEventArgs & args){
+ //required in order to call ofRegisterKeyEvents
+ }
+
+
};
@@ -81,8 +103,6 @@ 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);