|
|
@ -95,9 +95,10 @@ public class InputSystemJme implements InputSystem, RawInputListener { |
|
|
|
x = (int) evt.getX(); |
|
|
|
x = (int) evt.getX(); |
|
|
|
y = (int) (height - evt.getY()); |
|
|
|
y = (int) (height - evt.getY()); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (!inputManager.getSimulateMouse()) { |
|
|
|
switch (evt.getType()) { |
|
|
|
switch (evt.getType()) { |
|
|
|
case DOWN: |
|
|
|
case DOWN: |
|
|
|
consumed = nic.processMouseEvent(x, y, 0, 0, false); |
|
|
|
consumed = nic.processMouseEvent(x, y, 0, 0, true); |
|
|
|
isDragging = true; |
|
|
|
isDragging = true; |
|
|
|
niftyOwnsDragging = consumed; |
|
|
|
niftyOwnsDragging = consumed; |
|
|
|
if (consumed){ |
|
|
|
if (consumed){ |
|
|
@ -108,7 +109,7 @@ public class InputSystemJme implements InputSystem, RawInputListener { |
|
|
|
|
|
|
|
|
|
|
|
case UP: |
|
|
|
case UP: |
|
|
|
if (niftyOwnsDragging){ |
|
|
|
if (niftyOwnsDragging){ |
|
|
|
consumed = nic.processMouseEvent(x, y, 0, buttonIndex, pressed); |
|
|
|
consumed = nic.processMouseEvent(x, y, 0, 0, false); |
|
|
|
if (consumed){ |
|
|
|
if (consumed){ |
|
|
|
evt.setConsumed(); |
|
|
|
evt.setConsumed(); |
|
|
|
} |
|
|
|
} |
|
|
@ -119,6 +120,7 @@ public class InputSystemJme implements InputSystem, RawInputListener { |
|
|
|
break; |
|
|
|
break; |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
private void onMouseMotionEventQueued(MouseMotionEvent evt, NiftyInputConsumer nic) { |
|
|
|
private void onMouseMotionEventQueued(MouseMotionEvent evt, NiftyInputConsumer nic) { |
|
|
|
x = evt.getX(); |
|
|
|
x = evt.getX(); |
|
|
|