Skip to content

Commit 020d8ea

Browse files
committed
Tweak example to handle all mouse cursors
1 parent cbe00f0 commit 020d8ea

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

imgui-lwjgl3/src/test/java/ImGuiGlfwExample.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ public final class ImGuiGlfwExample {
5656
private final double[] mousePosY = new double[1];
5757

5858
// Mouse cursors provided by GLFW
59-
private final long[] mouseCursors = new long[ImGuiMouseCursor.COUNT - 1]; // Minus 1, because GLFW 3.4 doesn't provide GLFW_NOT_ALLOWED_CURSOR
59+
private final long[] mouseCursors = new long[ImGuiMouseCursor.COUNT];
6060

6161
// LWJGL3 rendered itself (SHOULD be initialized)
6262
private final ImGuiImplGl3 imGuiGl3 = new ImGuiImplGl3();
@@ -187,6 +187,7 @@ private void initImGui() {
187187
mouseCursors[ImGuiMouseCursor.ResizeNESW] = glfwCreateStandardCursor(GLFW_ARROW_CURSOR);
188188
mouseCursors[ImGuiMouseCursor.ResizeNWSE] = glfwCreateStandardCursor(GLFW_ARROW_CURSOR);
189189
mouseCursors[ImGuiMouseCursor.Hand] = glfwCreateStandardCursor(GLFW_HAND_CURSOR);
190+
mouseCursors[ImGuiMouseCursor.NotAllowed] = glfwCreateStandardCursor(GLFW_ARROW_CURSOR);
190191

191192
// ------------------------------------------------------------
192193
// Here goes GLFW callbacks to update user input in Dear ImGui

0 commit comments

Comments
 (0)