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

x33g5p2x  于2022-01-23 转载在 其他  
字(2.6k)|赞(0)|评价(0)|浏览(108)

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

Keyboard.create介绍

暂无

代码示例

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

public void initialize() {
  if (!context.isRenderable())
    return;
  
  try {
    Keyboard.create();
    Keyboard.enableRepeatEvents(true);
    logger.fine("Keyboard created.");
  } catch (LWJGLException ex) {
    logger.log(Level.SEVERE, "Error while creating keyboard.", ex);
  }
}

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

Keyboard.create();
keyboardWasCreated = false;

代码示例来源: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: com.ardor3d/ardor3d-lwjgl

public void init() {
  if (!Keyboard.isCreated()) {
    try {
      Keyboard.create();
    } catch (final LWJGLException e) {
      throw new RuntimeException(e);
    }
  }
}

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

@Override
void init(Listener platformListener) {
 try {
  Keyboard.create();
 } catch (LWJGLException e) {
  throw new RuntimeException(e);
 }
 super.init(platformListener);
}

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

public LWJGLInput (LWJGLPlatform plat) {
 super(plat);
 try {
  Keyboard.create();
  Mouse.create();
 } catch (LWJGLException e) {
  throw new RuntimeException(e);
 }
}

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

@Override
void init(Listener platformListener) {
 try {
  Keyboard.create();
 } catch (LWJGLException e) {
  throw new RuntimeException(e);
 }
 super.init(platformListener);
}

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

public void initialize() {
  if (!context.isRenderable())
    return;
  
  try {
    Keyboard.create();
    Keyboard.enableRepeatEvents(true);
    logger.fine("Keyboard created.");
  } catch (LWJGLException ex) {
    logger.log(Level.SEVERE, "Error while creating keyboard.", 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

Keyboard.create();
keyboardWasCreated = false;

代码示例来源:origin: org.ode4j/demo

Keyboard.create();
  Mouse.create();
} catch (LWJGLException e) {

相关文章