本文整理了Java中org.lwjgl.glfw.GLFW.glfwSetWindowPos()
方法的一些代码示例,展示了GLFW.glfwSetWindowPos()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。GLFW.glfwSetWindowPos()
方法的具体详情如下:
包路径:org.lwjgl.glfw.GLFW
类名称:GLFW
方法名:glfwSetWindowPos
[英]Sets the position, in screen coordinates, of the upper-left corner of the client area of the specified windowed mode window. If the window is a full screen window, this function does nothing.
Do not use this function to move an already visible window unless you have very good reasons for doing so, as it will confuse and annoy the user.
The window manager may put limits on what positions are allowed. GLFW cannot and should not override these limits.
Notes:
代码示例来源:origin: libgdx/libgdx
/** Sets the position of the window in logical coordinates. All monitors
* span a virtual surface together. The coordinates are relative to
* the first monitor in the virtual surface. **/
public void setPosition(int x, int y) {
GLFW.glfwSetWindowPos(windowHandle, x, y);
}
代码示例来源:origin: libgdx/libgdx
/** Sets the position of the window in logical coordinates. All monitors
* span a virtual surface together. The coordinates are relative to
* the first monitor in the virtual surface. **/
public void setPosition(int x, int y) {
GLFW.glfwSetWindowPos(windowHandle, x, y);
}
代码示例来源:origin: jMonkeyEngine/jmonkeyengine
org.lwjgl.glfw.GLFW.glfwSetWindowPos(window, origWidth - (int)windowSize.x, 32);
代码示例来源:origin: libgdx/libgdx
if (config.windowMaxHeight > -1) windowHeight = Math.min(windowHeight, config.windowMaxHeight);
GLFWVidMode vidMode = GLFW.glfwGetVideoMode(GLFW.glfwGetPrimaryMonitor());
GLFW.glfwSetWindowPos(windowHandle, vidMode.width() / 2 - windowWidth / 2, vidMode.height() / 2 - windowHeight / 2);
} else {
GLFW.glfwSetWindowPos(windowHandle, config.windowX, config.windowY);
代码示例来源:origin: libgdx/libgdx
if (config.windowMaxHeight > -1) windowHeight = Math.min(windowHeight, config.windowMaxHeight);
GLFWVidMode vidMode = GLFW.glfwGetVideoMode(GLFW.glfwGetPrimaryMonitor());
GLFW.glfwSetWindowPos(windowHandle, vidMode.width() / 2 - windowWidth / 2, vidMode.height() / 2 - windowHeight / 2);
} else {
GLFW.glfwSetWindowPos(windowHandle, config.windowX, config.windowY);
代码示例来源:origin: jMonkeyEngine/jmonkeyengine
glfwSetWindowPos(window,
(videoMode.width() - settings.getWidth()) / 2,
(videoMode.height() - settings.getHeight()) / 2);
代码示例来源:origin: jMonkeyEngine/jmonkeyengine
glfwSetWindowPos(window,
(videoMode.width() - settings.getWidth()) / 2,
(videoMode.height() - settings.getHeight()) / 2);
代码示例来源:origin: Renanse/Ardor3D
@Override
public void moveWindowTo(final int locX, final int locY) {
GLFW.glfwSetWindowPos(_windowId, locX, locY);
}
代码示例来源:origin: com.badlogicgames.gdx/gdx-backend-lwjgl3
/** Sets the position of the window in logical coordinates. All monitors
* span a virtual surface together. The coordinates are relative to
* the first monitor in the virtual surface. **/
public void setPosition(int x, int y) {
GLFW.glfwSetWindowPos(windowHandle, x, y);
}
代码示例来源:origin: sriharshachilakapati/SilenceEngine
/**
* <p> This method sets the position, in screen coordinates, of the upper-left corner of the client area of this
* windowed mode window. If the window is a full screen window, this function does nothing.</p>
*
* <p> <b>Do not use this method</b> to move an already visible window unless you have very good reasons for doing
* so, as it will confuse and annoy the user.</p>
*
* <p> The window manager may put limits on what positions are allowed. GLFW cannot and should not override these
* limits.</p>
*
* @param position The new position of this window.
*/
public void setPosition(Vector2 position)
{
this.position.set(position);
glfwSetWindowPos(handle, (int) position.x, (int) position.y);
}
代码示例来源:origin: WarmfulDevelopment/LWJGL-3-Tutorial
public void createWindow(String title) {
window = glfwCreateWindow(width, height, title, fullscreen ? glfwGetPrimaryMonitor() : 0, 0);
if (window == 0) throw new IllegalStateException("Failed to create window!");
if (!fullscreen) {
GLFWVidMode vid = glfwGetVideoMode(glfwGetPrimaryMonitor());
glfwSetWindowPos(window, (vid.width() - width) / 2, (vid.height() - height) / 2);
}
glfwShowWindow(window);
glfwMakeContextCurrent(window);
input = new Input(window);
setLocalCallbacks();
}
代码示例来源:origin: badlogic/lwjgl3-maven-gradle
glfwSetWindowPos(
window,
(GLFWvidmode.width(vidmode) - WIDTH) / 2,
代码示例来源:origin: badlogic/lwjgl3-maven-gradle
glfwSetWindowPos(
window,
(GLFWvidmode.width(vidmode) - WIDTH) / 2,
代码示例来源:origin: playn/playn
input = new GLFWInput(this, window);
glfwSetWindowPos(window, (vidMode.width() - width) / 2, (vidMode.height() - height) / 2);
glfwMakeContextCurrent(window);
glfwSwapInterval(1);
代码示例来源:origin: lwjglgamedev/lwjglbook
glfwSetWindowPos(
windowHandle,
(vidmode.width() - width) / 2,
代码示例来源:origin: lwjglgamedev/lwjglbook
glfwSetWindowPos(
windowHandle,
(vidmode.width() - width) / 2,
代码示例来源:origin: lwjglgamedev/lwjglbook
glfwSetWindowPos(
windowHandle,
(vidmode.width() - width) / 2,
代码示例来源:origin: lwjglgamedev/lwjglbook
glfwSetWindowPos(
windowHandle,
(vidmode.width() - width) / 2,
代码示例来源:origin: lwjglgamedev/lwjglbook
glfwSetWindowPos(
windowHandle,
(vidmode.width() - width) / 2,
代码示例来源:origin: lwjglgamedev/lwjglbook
glfwSetWindowPos(
windowHandle,
(vidmode.width() - width) / 2,
内容来源于网络,如有侵权,请联系作者删除!