本文整理了Java中org.lwjgl.input.Mouse.create()
方法的一些代码示例,展示了Mouse.create()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Mouse.create()
方法的具体详情如下:
包路径:org.lwjgl.input.Mouse
类名称:Mouse
方法名:create
暂无
代码示例来源:origin: jMonkeyEngine/jmonkeyengine
Mouse.create();
if (mouseWasGrabbed){
Mouse.setGrabbed(true);
代码示例来源:origin: jMonkeyEngine/jmonkeyengine
public void initialize() {
if (!context.isRenderable())
return;
try {
Mouse.create();
logger.fine("Mouse created.");
supportHardwareCursor = (Cursor.getCapabilities() & Cursor.CURSOR_ONE_BIT_TRANSPARENCY) != 0;
// Recall state that was set before initialization
Mouse.setGrabbed(!cursorVisible);
} catch (LWJGLException ex) {
logger.log(Level.SEVERE, "Error while creating mouse", ex);
}
if (listener != null) {
sendFirstMouseEvent();
}
}
代码示例来源:origin: MovingBlocks/Terasology
private void initControls() {
try {
Keyboard.create();
Keyboard.enableRepeatEvents(true);
Mouse.create();
InputSystem inputSystem = new InputSystem();
context.put(InputSystem.class, inputSystem);
inputSystem.setMouseDevice(new LwjglMouseDevice(context));
inputSystem.setKeyboardDevice(new LwjglKeyboardDevice());
ControllerConfig controllerConfig = context.get(Config.class).getInput().getControllers();
JInputControllerDevice controllerDevice = new JInputControllerDevice(controllerConfig);
inputSystem.setControllerDevice(controllerDevice);
} catch (LWJGLException e) {
throw new RuntimeException("Could not initialize controls.", e);
}
}
代码示例来源:origin: threerings/playn
@Override
void init() {
try {
Mouse.create();
} catch (LWJGLException e) {
throw new RuntimeException(e);
}
}
代码示例来源:origin: com.googlecode.playn/playn-java
@Override
void init() {
try {
Mouse.create();
} catch (LWJGLException e) {
throw new RuntimeException(e);
}
}
代码示例来源:origin: playn/playn
public LWJGLInput (LWJGLPlatform plat) {
super(plat);
try {
Keyboard.create();
Mouse.create();
} catch (LWJGLException e) {
throw new RuntimeException(e);
}
}
代码示例来源:origin: com.ardor3d/ardor3d-lwjgl
public void init() {
if (!Mouse.isCreated()) {
try {
Mouse.create();
} catch (final Exception e) {
throw new RuntimeException(e);
}
}
}
代码示例来源:origin: com.ardor3d/ardor3d-lwjgl
private void init() {
if (!_inited) {
if (!Mouse.isCreated()) {
try {
Mouse.create();
} catch (final Exception e) {
// this typically happens if the Display hasn't been initialized.
throw new RuntimeException("Unable to initialise mouse manager", e);
}
}
_inited = true;
}
}
代码示例来源:origin: us.ihmc.thirdparty.jme/jme3-lwjgl
public void initialize() {
if (!context.isRenderable())
return;
try {
Mouse.create();
logger.fine("Mouse created.");
supportHardwareCursor = (Cursor.getCapabilities() & Cursor.CURSOR_ONE_BIT_TRANSPARENCY) != 0;
// Recall state that was set before initialization
Mouse.setGrabbed(!cursorVisible);
} catch (LWJGLException ex) {
logger.log(Level.SEVERE, "Error while creating mouse", ex);
}
}
代码示例来源:origin: nifty-gui/nifty-gui
public void startup() throws Exception {
Mouse.create();
Keyboard.create();
Keyboard.enableRepeatEvents(true);
logMouseCapabilities();
}
代码示例来源:origin: us.ihmc.thirdparty.jme/jme3-lwjgl
Mouse.create();
if (mouseWasGrabbed){
Mouse.setGrabbed(true);
代码示例来源:origin: org.ode4j/demo
Mouse.create();
} catch (LWJGLException e) {
throw new RuntimeException(e);
内容来源于网络,如有侵权,请联系作者删除!