From 4aea96f4b9f969f99ec458f106678b1098cbc806 Mon Sep 17 00:00:00 2001 From: "Sha..rd" Date: Tue, 13 Nov 2012 03:14:51 +0000 Subject: [PATCH] * Made nifty mouse wheel rotation be the same as nifty LWJGL's renderer (1/-1 instead of 120/-120) git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@9994 75d07b2b-3a1a-0410-a2c5-0572b91ccdca --- engine/src/niftygui/com/jme3/niftygui/InputSystemJme.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/engine/src/niftygui/com/jme3/niftygui/InputSystemJme.java b/engine/src/niftygui/com/jme3/niftygui/InputSystemJme.java index 8129bd314..463a7896e 100644 --- a/engine/src/niftygui/com/jme3/niftygui/InputSystemJme.java +++ b/engine/src/niftygui/com/jme3/niftygui/InputSystemJme.java @@ -181,9 +181,10 @@ public class InputSystemJme implements InputSystem, RawInputListener { } private void onMouseMotionEventQueued(MouseMotionEvent evt, NiftyInputConsumer nic) { + int wheel = evt.getDeltaWheel() / 120; x = evt.getX(); y = height - evt.getY(); - nic.processMouseEvent(x, y, evt.getDeltaWheel(), -1, false); + nic.processMouseEvent(x, y, wheel, -1, false); // if (nic.processMouseEvent(niftyEvt) /*|| nifty.getCurrentScreen().isMouseOverElement()*/){ // Do not consume motion events //evt.setConsumed();