preliminary implementation of wheel events (issue #1423)

This commit is contained in:
benfry
2013-01-19 20:18:09 +00:00
parent 1af0c3fea4
commit f5ccad12b3
5 changed files with 108 additions and 21 deletions

View File

@@ -3244,11 +3244,15 @@ public class PGL {
peButton = PConstants.RIGHT;
}
float peAmount = peAction == MouseEvent.WHEEL ?
nativeEvent.getWheelRotation() :
nativeEvent.getClickCount();
MouseEvent me = new MouseEvent(nativeEvent, nativeEvent.getWhen(),
peAction, peModifiers,
nativeEvent.getX(), nativeEvent.getY(),
peButton,
nativeEvent.getClickCount());
peAmount);
pg.parent.postEvent(me);
}
@@ -3335,7 +3339,7 @@ public class PGL {
}
@Override
public void mouseWheelMoved(com.jogamp.newt.event.MouseEvent e) {
// Not supported in Processing.
nativeMouseEvent(e, MouseEvent.WHEEL);
}
}