本文整理了Java中org.lwjgl.input.Mouse.isCreated()
方法的一些代码示例,展示了Mouse.isCreated()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Mouse.isCreated()
方法的具体详情如下:
包路径:org.lwjgl.input.Mouse
类名称:Mouse
方法名:isCreated
暂无
代码示例来源:origin: jMonkeyEngine/jmonkeyengine
public boolean isInitialized(){
return Mouse.isCreated();
}
代码示例来源:origin: jMonkeyEngine/jmonkeyengine
@Override
public void setInputListener(RawInputListener listener) {
this.listener = listener;
if (listener != null && Mouse.isCreated()) {
sendFirstMouseEvent();
}
}
代码示例来源:origin: jMonkeyEngine/jmonkeyengine
private void pauseCanvas(){
if (Mouse.isCreated()){
if (Mouse.isGrabbed()){
Mouse.setGrabbed(false);
mouseWasGrabbed = true;
}
mouseWasCreated = true;
Mouse.destroy();
}
if (Keyboard.isCreated()){
keyboardWasCreated = true;
Keyboard.destroy();
}
renderable.set(false);
destroyContext();
}
代码示例来源:origin: jMonkeyEngine/jmonkeyengine
/**
* Send the input listener a special mouse-motion event with zero deltas in
* order to initialize the listener's cursor position.
*/
private void sendFirstMouseEvent() {
assert listener != null;
assert Mouse.isCreated();
int x = Mouse.getX();
int y = Mouse.getY();
int xDelta = 0;
int yDelta = 0;
int wheelDelta = 0;
MouseMotionEvent evt = new MouseMotionEvent(x, y, xDelta, yDelta,
curWheel, wheelDelta);
evt.setTime(Mouse.getEventNanoseconds());
listener.onMouseMotionEvent(evt);
}
代码示例来源:origin: libgdx/libgdx
void updateMouse () {
justTouched = false;
if (Mouse.isCreated()) {
int events = 0;
while (Mouse.next()) {
代码示例来源:origin: libgdx/libgdx
void updateMouse () {
justTouched = false;
if (Mouse.isCreated()) {
int events = 0;
while (Mouse.next()) {
代码示例来源:origin: us.ihmc.thirdparty.jme/jme3-lwjgl
public boolean isInitialized(){
return Mouse.isCreated();
}
代码示例来源: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: org.lwjgl.lwjgl/lwjgl_util
public synchronized void pollDevice() throws IOException {
if (!org.lwjgl.input.Mouse.isCreated())
return;
org.lwjgl.input.Mouse.poll();
for (int i = 0; i < 3; i++)
setButtonState(i);
}
代码示例来源:origin: us.ihmc.thirdparty.jme/jme3-lwjgl
private void pauseCanvas(){
if (Mouse.isCreated()){
if (Mouse.isGrabbed()){
Mouse.setGrabbed(false);
mouseWasGrabbed = true;
}
mouseWasCreated = true;
Mouse.destroy();
}
if (Keyboard.isCreated()){
keyboardWasCreated = true;
Keyboard.destroy();
}
renderable.set(false);
destroyContext();
}
代码示例来源:origin: com.badlogicgames.gdx/gdx-backend-lwjgl
void updateMouse () {
justTouched = false;
if (Mouse.isCreated()) {
int events = 0;
while (Mouse.next()) {
代码示例来源:origin: org.lwjgl.lwjgl/lwjgl_util
protected synchronized boolean getNextDeviceEvent(Event event) throws IOException {
if (!org.lwjgl.input.Mouse.isCreated())
return false;
while (true) {
内容来源于网络,如有侵权,请联系作者删除!