use of com.jme3.input.event.MouseButtonEvent in project jmonkeyengine by jMonkeyEngine.
the class AwtMouseInput method mouseReleased.
public void mouseReleased(MouseEvent awtEvt) {
int y = component.getHeight() - awtEvt.getY();
MouseButtonEvent evt = new MouseButtonEvent(getJMEButtonIndex(awtEvt), false, awtEvt.getX(), y);
evt.setTime(awtEvt.getWhen());
synchronized (eventQueue) {
eventQueue.add(evt);
}
}
use of com.jme3.input.event.MouseButtonEvent in project jmonkeyengine by jMonkeyEngine.
the class NewtMouseInput method mouseReleased.
@Override
public void mouseReleased(MouseEvent awtEvt) {
MouseButtonEvent evt = new MouseButtonEvent(getJMEButtonIndex(awtEvt), false, awtEvt.getX(), component.getSurfaceHeight() - awtEvt.getY());
evt.setTime(awtEvt.getWhen());
synchronized (eventQueue) {
eventQueue.add(evt);
}
}
use of com.jme3.input.event.MouseButtonEvent in project jmonkeyengine by jMonkeyEngine.
the class GlfwMouseInput method onMouseButton.
private void onMouseButton(final long window, final int button, final int action, final int mods) {
final MouseButtonEvent mouseButtonEvent = new MouseButtonEvent(convertButton(button), action == GLFW_PRESS, mouseX, mouseY);
mouseButtonEvent.setTime(getInputTimeNanos());
mouseButtonEvents.add(mouseButtonEvent);
}
use of com.jme3.input.event.MouseButtonEvent in project jmonkeyengine by jMonkeyEngine.
the class GlfwMouseInputVR method onMouseButton.
private void onMouseButton(final long window, final int button, final int action, final int mods) {
final MouseButtonEvent mouseButtonEvent = new MouseButtonEvent(convertButton(button), action == GLFW_PRESS, mouseX, mouseY);
mouseButtonEvent.setTime(getInputTimeNanos());
mouseButtonEvents.add(mouseButtonEvent);
}
Aggregations