From 76ff6bb99f58066bf8e2179a437f95a925d5b7b7 Mon Sep 17 00:00:00 2001 From: "rac..om" Date: Fri, 25 Mar 2011 22:56:51 +0000 Subject: [PATCH] Mouse wheel and the other two mouse buttons should now also be fixed. Since this is not tested in the NiftyGUI test there's no real of know till a test has been created though. To fix it I just tweaked the appropriate if statements a bit. git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@7115 75d07b2b-3a1a-0410-a2c5-0572b91ccdca --- engine/src/niftygui/com/jme3/niftygui/InputSystemJme.java | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/engine/src/niftygui/com/jme3/niftygui/InputSystemJme.java b/engine/src/niftygui/com/jme3/niftygui/InputSystemJme.java index 19b90cf9d..f8f09f53c 100644 --- a/engine/src/niftygui/com/jme3/niftygui/InputSystemJme.java +++ b/engine/src/niftygui/com/jme3/niftygui/InputSystemJme.java @@ -117,9 +117,10 @@ public class InputSystemJme implements InputSystem, RawInputListener { public void onMouseMotionEvent(MouseMotionEvent evt) { // Only forward the event if there's actual motion involved. - // Ignores mouse wheel + // No longer ignores mouse wheel if (inputManager.isCursorVisible() && (evt.getDX() != 0 || - evt.getDY() != 0)){ + evt.getDY() != 0 || + evt.getDeltaWheel() != 0)){ inputQueue.add(evt); } } @@ -142,7 +143,7 @@ public class InputSystemJme implements InputSystem, RawInputListener { } public void onMouseButtonEvent(MouseButtonEvent evt) { - if (inputManager.isCursorVisible() && evt.getButtonIndex() == 0){ + if (inputManager.isCursorVisible() && evt.getButtonIndex() >= 0 || evt.getButtonIndex() <= 2){ inputQueue.add(evt); } }