From 2dc6dafa909d44f06e8e2a208da6321f583eddaa Mon Sep 17 00:00:00 2001 From: arcade_kappa Date: Sat, 7 Sep 2024 08:24:07 +0800 Subject: [PATCH] Implement Display.setLocation() --- src/main/java/org/lwjgl/opengl/Display.java | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/main/java/org/lwjgl/opengl/Display.java b/src/main/java/org/lwjgl/opengl/Display.java index cab46fa4..e292ee4f 100644 --- a/src/main/java/org/lwjgl/opengl/Display.java +++ b/src/main/java/org/lwjgl/opengl/Display.java @@ -323,7 +323,12 @@ public static boolean isVisible() { } public static void setLocation(int new_x, int new_y) { - System.out.println("TODO: Implement Display.setLocation(int, int)"); + if (!displayCreated) { + displayX = new_x; + displayY = new_y; + } else { + GLFW.glfwSetWindowPos(Window.handle, new_x, new_y); + } } public static void setVSyncEnabled(boolean sync) {