diff options
author | Sven Gothel <[email protected]> | 2012-04-24 19:00:15 +0200 |
---|---|---|
committer | Sven Gothel <[email protected]> | 2012-04-24 19:00:15 +0200 |
commit | 781865768bb8da38cf3de254b93bae0a8d43f1a6 (patch) | |
tree | c064c990228cb031f32948e997acd27e7c943c61 /src/newt/classes/jogamp | |
parent | 5854705968e73c222724be24eecd21c488a7e977 (diff) |
Newt/AWT Event Factory: Add Mouse Wheel Event Conversion
.. also reverse AWT rotation sign, since NEWT uses the reverse oriantation.
Diffstat (limited to 'src/newt/classes/jogamp')
-rw-r--r-- | src/newt/classes/jogamp/newt/awt/event/AWTNewtEventFactory.java | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/newt/classes/jogamp/newt/awt/event/AWTNewtEventFactory.java b/src/newt/classes/jogamp/newt/awt/event/AWTNewtEventFactory.java index d64cc9359..cb70da13f 100644 --- a/src/newt/classes/jogamp/newt/awt/event/AWTNewtEventFactory.java +++ b/src/newt/classes/jogamp/newt/awt/event/AWTNewtEventFactory.java @@ -120,7 +120,8 @@ public class AWTNewtEventFactory { if(0xFFFFFFFF != type) { int rotation = 0; if (event instanceof java.awt.event.MouseWheelEvent) { - rotation = ((java.awt.event.MouseWheelEvent)event).getWheelRotation(); + // AWT/NEWT rotation is reversed - AWT +1 is down, NEWT +1 is up. + rotation = -1 * ((java.awt.event.MouseWheelEvent)event).getWheelRotation(); } int mods = awtModifiers2Newt(event.getModifiers(), true); |