From c0e32ef7278e108614186ff51f8e4260313a0e9e Mon Sep 17 00:00:00 2001 From: Tim Redfern Date: Tue, 24 Apr 2018 22:32:17 +0100 Subject: bugfix --- gui/src/ofApp.cpp | 24 ++++++++++++++++++------ 1 file changed, 18 insertions(+), 6 deletions(-) (limited to 'gui/src/ofApp.cpp') diff --git a/gui/src/ofApp.cpp b/gui/src/ofApp.cpp index 570dfb3..08a77a8 100644 --- a/gui/src/ofApp.cpp +++ b/gui/src/ofApp.cpp @@ -336,29 +336,41 @@ void ofApp::mouseMoved(int x, int y ){ //-------------------------------------------------------------- void ofApp::mouseDragged(int x, int y, int button){ - sets[selected_set].mouseDragged(x,y,button); + +} + +void ofApp::guiMouseDragged(ofMouseEventArgs &args){ + sets[selected_set].mouseDragged(args.x,args.y,args.button); } //-------------------------------------------------------------- void ofApp::mousePressed(int x, int y, int button){ +} + +void ofApp::guiMousePressed(ofMouseEventArgs &args){ if (commandPressed){ - if (y<200){ - sets[0].mousePressed(x,y,OF_MOUSE_BUTTON_4); + if (args.y<200){ + sets[0].mousePressed(args.x,args.y,OF_MOUSE_BUTTON_4); } else { - sets[1].mousePressed(x,y,OF_MOUSE_BUTTON_4); + sets[1].mousePressed(args.x,args.y,OF_MOUSE_BUTTON_4); } } else { - sets[selected_set].mousePressed(x,y,button); + sets[selected_set].mousePressed(args.x,args.y,args.button); } } //-------------------------------------------------------------- void ofApp::mouseReleased(int x, int y, int button){ - sets[selected_set].mouseReleased(x,y,button); + +} + +void ofApp::guiMouseReleased(ofMouseEventArgs &args){ + sets[selected_set].mouseReleased(args.x,args.y,args.button); } + //-------------------------------------------------------------- void ofApp::mouseEntered(int x, int y){ -- cgit v1.2.3