org.lwjgl.input.Mouse.getEventDY()方法的使用及代码示例

x33g5p2x  于2022-01-25 转载在 其他  
字(3.5k)|赞(0)|评价(0)|浏览(104)

本文整理了Java中org.lwjgl.input.Mouse.getEventDY()方法的一些代码示例,展示了Mouse.getEventDY()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Mouse.getEventDY()方法的具体详情如下:
包路径:org.lwjgl.input.Mouse
类名称:Mouse
方法名:getEventDY

Mouse.getEventDY介绍

暂无

代码示例

代码示例来源:origin: libgdx/libgdx

mouseY = event.y;
deltaX = (int)(Mouse.getEventDX() * Display.getPixelScaleFactor());
deltaY = (int)(Mouse.getEventDY() * Display.getPixelScaleFactor());

代码示例来源:origin: libgdx/libgdx

mouseY = event.y;
deltaX = (int)(Mouse.getEventDX() * Display.getPixelScaleFactor());
deltaY = (int)(Mouse.getEventDY() * Display.getPixelScaleFactor());

代码示例来源:origin: jMonkeyEngine/jmonkeyengine

int yDelta = Mouse.getEventDY();
int x = Mouse.getX();
int y = Mouse.getY();

代码示例来源:origin: org.slick2d/slick2d-core

if ((Mouse.getEventDX() != 0) || (Mouse.getEventDY() != 0)) {
  consumed = false;
  for (int i=0;i<mouseListeners.size();i++) {
    if (listener.isAcceptingInput()) {
      if (anyMouseDown()) {
        listener.mouseDragged(0, 0, Mouse.getEventDX(), -Mouse.getEventDY());	
      } else {
        listener.mouseMoved(0, 0, Mouse.getEventDX(), -Mouse.getEventDY());

代码示例来源:origin: com.badlogicgames.gdx/gdx-backend-lwjgl

mouseY = event.y;
deltaX = (int)(Mouse.getEventDX() * Display.getPixelScaleFactor());
deltaY = (int)(Mouse.getEventDY() * Display.getPixelScaleFactor());

代码示例来源:origin: com.ardor3d/ardor3d-lwjgl

.getEventDY(), Mouse.getEventDWheel(), buttons, null);

代码示例来源:origin: RS485/LogisticsPipes

double dy = (Mouse.getEventDY() / (double) mc.displayHeight);
if (Keyboard.isKeyDown(Keyboard.KEY_LCONTROL) || Keyboard.isKeyDown(Keyboard.KEY_LSHIFT)) {
  distance -= dy * 15;
double dy = -Mouse.getEventDY();
Vector3d orivec = camera.getWorldPoint(new Vector2d(0, 0));
Vector3d newvec = camera.getWorldPoint(new Vector2d(dx * distance, dy * distance)).negate();

代码示例来源:origin: SleepyTrousers/EnderIO

double dy = (Mouse.getEventDY() / (double) mc.displayHeight);
if (Keyboard.isKeyDown(Keyboard.KEY_LCONTROL) || Keyboard.isKeyDown(Keyboard.KEY_LSHIFT)) {
 distance -= dy * 15;

代码示例来源:origin: threerings/playn

@Override
void update() {
 while (Mouse.next()) {
  double time = (double) (Mouse.getEventNanoseconds() / 1000000);
  int btn = getButton(Mouse.getEventButton());
  Point m = new Point(Mouse.getEventX(), Display.getHeight() - Mouse.getEventY() - 1);
  platform.graphics().transformMouse(m);
  int dx = Mouse.getEventDX(), dy = -Mouse.getEventDY();
  if (btn != -1) {
   if (Mouse.getEventButtonState()) {
    onMouseDown(time, m.x, m.y, btn);
   } else {
    onMouseUp(time, m.x, m.y, btn);
   }
  } else if (Mouse.getEventDWheel() != 0) {
   int delta = Mouse.getEventDWheel() > 0 ? -1 : 1;
   onMouseWheelScroll(time, m.x, m.y, delta);
  } else {
   onMouseMove(time, m.x, m.y, dx, dy);
  }
 }
}

代码示例来源:origin: com.googlecode.playn/playn-java

@Override
void update() {
 while (Mouse.next()) {
  double time = (double) (Mouse.getEventNanoseconds() / 1000000);
  int btn = getButton(Mouse.getEventButton());
  Point m = new Point(Mouse.getEventX(), Display.getHeight() - Mouse.getEventY() - 1);
  platform.graphics().transformMouse(m);
  int dx = Mouse.getEventDX(), dy = -Mouse.getEventDY();
  if (btn != -1) {
   if (Mouse.getEventButtonState()) {
    onMouseDown(time, m.x, m.y, btn);
   } else {
    onMouseUp(time, m.x, m.y, btn);
   }
  } else if (Mouse.getEventDWheel() != 0) {
   int delta = Mouse.getEventDWheel() > 0 ? -1 : 1;
   onMouseWheelScroll(time, m.x, m.y, delta);
  } else {
   onMouseMove(time, m.x, m.y, dx, dy);
  }
 }
}

代码示例来源:origin: us.ihmc.thirdparty.jme/jme3-lwjgl

int yDelta = Mouse.getEventDY();
int x = Mouse.getX();
int y = Mouse.getY();

代码示例来源:origin: org.lwjgl.lwjgl/lwjgl_util

int dy = -org.lwjgl.input.Mouse.getEventDY();
if (dy != 0) {
  event.set(getY(), dy, nanos);

代码示例来源:origin: playn/playn

int wheel = Mouse.getEventDWheel();
if (wheel != 0) emitMouseWheel(flags, time, m.x, m.y, wheel > 0 ? -1 : 1);
else emitMouseMotion(flags, time, m.x, m.y, Mouse.getEventDX(), -Mouse.getEventDY());

相关文章