本文整理了Java中org.lwjgl.glfw.GLFW.glfwGetInputMode()
方法的一些代码示例,展示了GLFW.glfwGetInputMode()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。GLFW.glfwGetInputMode()
方法的具体详情如下:
包路径:org.lwjgl.glfw.GLFW
类名称:GLFW
方法名:glfwGetInputMode
[英]Returns the value of an input option for the specified window.
This function must only be called from the main thread.
[中]返回指定窗口的输入选项的值。
只能从主线程调用此函数。
代码示例来源:origin: libgdx/libgdx
@Override
public boolean isCursorCatched() {
return GLFW.glfwGetInputMode(window.getWindowHandle(), GLFW.GLFW_CURSOR) == GLFW.GLFW_CURSOR_DISABLED;
}
代码示例来源:origin: libgdx/libgdx
@Override
public boolean isCursorCatched() {
return GLFW.glfwGetInputMode(window.getWindowHandle(), GLFW.GLFW_CURSOR) == GLFW.GLFW_CURSOR_DISABLED;
}
代码示例来源:origin: playn/playn
@Override public boolean isMouseLocked() {
return glfwGetInputMode(window, GLFW_CURSOR) == GLFW_CURSOR_DISABLED;
}
代码示例来源:origin: playn/playn
@Override public void invoke(long handle, double xoffset, double yoffset) {
Point m = queryCursorPosition();
double time = System.currentTimeMillis();
//TODO: is it correct that just simply sets the flag as 0?
if (GLFW_CURSOR_DISABLED == glfwGetInputMode(window, GLFW_CURSOR))
emitMouseMotion(0, time, m.x, m.y, (float) xoffset, -(float) yoffset);
else emitMouseWheel(0, time, m.x, m.y, yoffset > 0 ? -1 : 1);
}
};
代码示例来源:origin: com.badlogicgames.gdx/gdx-backend-lwjgl3
@Override
public boolean isCursorCatched() {
return GLFW.glfwGetInputMode(window.getWindowHandle(), GLFW.GLFW_CURSOR) == GLFW.GLFW_CURSOR_DISABLED;
}
内容来源于网络,如有侵权,请联系作者删除!