summaryrefslogtreecommitdiff
path: root/gui/src/ofApp.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'gui/src/ofApp.cpp')
-rw-r--r--gui/src/ofApp.cpp23
1 files changed, 21 insertions, 2 deletions
diff --git a/gui/src/ofApp.cpp b/gui/src/ofApp.cpp
index 43f51f1..cbfb139 100644
--- a/gui/src/ofApp.cpp
+++ b/gui/src/ofApp.cpp
@@ -41,6 +41,8 @@ void ofApp::setup(){
sets[0].init();
sets[1].init();
+
+ commandPressed=false;
}
//--------------------------------------------------------------
@@ -256,6 +258,11 @@ void ofApp::newMidiMessage(ofxMidiMessage& msg) {
//--------------------------------------------------------------
void ofApp::keyPressed(ofKeyEventArgs &args){
+
+ if (args.key==OF_KEY_COMMAND){
+ commandPressed=true;
+ }
+
sets[selected_set].keyPressed(args);
if(args.key == '\''){
@@ -293,7 +300,9 @@ void ofApp::outputKeyPressed(ofKeyEventArgs &args){
//--------------------------------------------------------------
void ofApp::keyReleased(int key){
-
+ if (key==OF_KEY_COMMAND){
+ commandPressed=false;
+ }
}
//--------------------------------------------------------------
@@ -308,7 +317,17 @@ void ofApp::mouseDragged(int x, int y, int button){
//--------------------------------------------------------------
void ofApp::mousePressed(int x, int y, int button){
- sets[selected_set].mousePressed(x,y,button);
+ if (commandPressed){
+ if (y<200){
+ sets[0].mousePressed(x,y,OF_MOUSE_BUTTON_4);
+ }
+ else {
+ sets[1].mousePressed(x,y,OF_MOUSE_BUTTON_4);
+ }
+ }
+ else {
+ sets[selected_set].mousePressed(x,y,button);
+ }
}
//--------------------------------------------------------------