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
3.0
rac..om 14 years ago
parent 8cdef21af6
commit 76ff6bb99f
  1. 7
      engine/src/niftygui/com/jme3/niftygui/InputSystemJme.java

@ -117,9 +117,10 @@ public class InputSystemJme implements InputSystem, RawInputListener {
public void onMouseMotionEvent(MouseMotionEvent evt) { public void onMouseMotionEvent(MouseMotionEvent evt) {
// Only forward the event if there's actual motion involved. // Only forward the event if there's actual motion involved.
// Ignores mouse wheel // No longer ignores mouse wheel
if (inputManager.isCursorVisible() && (evt.getDX() != 0 || if (inputManager.isCursorVisible() && (evt.getDX() != 0 ||
evt.getDY() != 0)){ evt.getDY() != 0 ||
evt.getDeltaWheel() != 0)){
inputQueue.add(evt); inputQueue.add(evt);
} }
} }
@ -142,7 +143,7 @@ public class InputSystemJme implements InputSystem, RawInputListener {
} }
public void onMouseButtonEvent(MouseButtonEvent evt) { public void onMouseButtonEvent(MouseButtonEvent evt) {
if (inputManager.isCursorVisible() && evt.getButtonIndex() == 0){ if (inputManager.isCursorVisible() && evt.getButtonIndex() >= 0 || evt.getButtonIndex() <= 2){
inputQueue.add(evt); inputQueue.add(evt);
} }
} }

Loading…
Cancel
Save