本文整理汇总了Java中com.jme3.input.event.MouseMotionEvent.getDX方法的典型用法代码示例。如果您正苦于以下问题:Java MouseMotionEvent.getDX方法的具体用法?Java MouseMotionEvent.getDX怎么用?Java MouseMotionEvent.getDX使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.jme3.input.event.MouseMotionEvent
的用法示例。
在下文中一共展示了MouseMotionEvent.getDX方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: onMouseMotionEvent
import com.jme3.input.event.MouseMotionEvent; //导入方法依赖的package包/类
public void onMouseMotionEvent(MouseMotionEvent evt) {
x += evt.getDX();
y += evt.getDY();
// Prevent mouse from leaving screen
AppSettings settings = TestSoftwareMouse.this.settings;
x = FastMath.clamp(x, 0, settings.getWidth());
y = FastMath.clamp(y, 0, settings.getHeight());
// adjust for hotspot
cursor.setPosition(x, y - 64);
}
示例2: onMouseMotionEvent
import com.jme3.input.event.MouseMotionEvent; //导入方法依赖的package包/类
public void onMouseMotionEvent(MouseMotionEvent evt) {
// Only forward the event if there's actual motion involved.
// No longer ignores mouse wheel
if (inputManager.isCursorVisible() && (evt.getDX() != 0 ||
evt.getDY() != 0 ||
evt.getDeltaWheel() != 0)){
inputQueue.add(evt);
}
}
示例3: onMouseMotionEvent
import com.jme3.input.event.MouseMotionEvent; //导入方法依赖的package包/类
public void onMouseMotionEvent(MouseMotionEvent evt) {
// Only forward the event if there's actual motion involved.
if (inputManager.isCursorVisible() && (evt.getDX() != 0 ||
evt.getDY() != 0 ||
evt.getDeltaWheel() != 0)){
inputQueue.add(evt);
}
}
示例4: MouseUIMotionEvent
import com.jme3.input.event.MouseMotionEvent; //导入方法依赖的package包/类
public MouseUIMotionEvent(MouseMotionEvent originator, int relx, int rely, E element, int modifiers) {
this(originator.getX(), originator.getY(), originator.getDX(), originator.getDY(), originator.getWheel(),
originator.getDeltaWheel(), relx, rely, modifiers, element);
this.originator = originator;
}