mirror of
https://github.com/processing/processing4.git
synced 2026-02-14 19:05:34 +01:00
preliminary implementation of wheel events (issue #1423)
This commit is contained in:
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user