Browse Source

Improve ScaleWidget mouse dragged fix

The problem was in ofxPiMapper class where mousePressed(x, y, button) was transformed into
onMousePressed(ofMouseEventArgs & args) version. The event type was missing. Added now.
master
Krisjanis Rijnieks 8 years ago
parent
commit
03b06f108a
  1. 3
      src/Gui/Widgets/ScaleWidget.cpp
  2. 3
      src/ofxPiMapper.cpp

3
src/Gui/Widgets/ScaleWidget.cpp

@ -139,9 +139,6 @@ void ScaleWidget::onMouseDragged(ofMouseEventArgs & args){
GuiWidgetEvent e;
e.args = args;
// Make sure that the args type is Dragged
e.args.type = e.args.Dragged;
ofNotifyEvent(guiWidgetEvent, e, this);
}
}

3
src/ofxPiMapper.cpp

@ -31,6 +31,7 @@ void ofxPiMapper::mousePressed(int x, int y, int button){
args.x = x;
args.y = y;
args.button = button;
args.type = ofMouseEventArgs::Pressed;
_application.onMousePressed(args);
}
@ -39,6 +40,7 @@ void ofxPiMapper::mouseReleased(int x, int y, int button){
args.x = x;
args.y = y;
args.button = button;
args.type = ofMouseEventArgs::Released;
_application.onMouseReleased(args);
}
@ -47,6 +49,7 @@ void ofxPiMapper::mouseDragged(int x, int y, int button){
args.x = x;
args.y = y;
args.button = button;
args.type = ofMouseEventArgs::Dragged;
_application.onMouseDragged(args);
}

Loading…
Cancel
Save