From 020d8ea36a845c124f8a3aac2c175c22239d12e8 Mon Sep 17 00:00:00 2001 From: SpaiR Date: Tue, 11 Feb 2020 20:58:15 +0300 Subject: [PATCH] Tweak example to handle all mouse cursors --- imgui-lwjgl3/src/test/java/ImGuiGlfwExample.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/imgui-lwjgl3/src/test/java/ImGuiGlfwExample.java b/imgui-lwjgl3/src/test/java/ImGuiGlfwExample.java index 4b76932..0c9cbeb 100644 --- a/imgui-lwjgl3/src/test/java/ImGuiGlfwExample.java +++ b/imgui-lwjgl3/src/test/java/ImGuiGlfwExample.java @@ -56,7 +56,7 @@ public final class ImGuiGlfwExample { private final double[] mousePosY = new double[1]; // Mouse cursors provided by GLFW - private final long[] mouseCursors = new long[ImGuiMouseCursor.COUNT - 1]; // Minus 1, because GLFW 3.4 doesn't provide GLFW_NOT_ALLOWED_CURSOR + private final long[] mouseCursors = new long[ImGuiMouseCursor.COUNT]; // LWJGL3 rendered itself (SHOULD be initialized) private final ImGuiImplGl3 imGuiGl3 = new ImGuiImplGl3(); @@ -187,6 +187,7 @@ public final class ImGuiGlfwExample { mouseCursors[ImGuiMouseCursor.ResizeNESW] = glfwCreateStandardCursor(GLFW_ARROW_CURSOR); mouseCursors[ImGuiMouseCursor.ResizeNWSE] = glfwCreateStandardCursor(GLFW_ARROW_CURSOR); mouseCursors[ImGuiMouseCursor.Hand] = glfwCreateStandardCursor(GLFW_HAND_CURSOR); + mouseCursors[ImGuiMouseCursor.NotAllowed] = glfwCreateStandardCursor(GLFW_ARROW_CURSOR); // ------------------------------------------------------------ // Here goes GLFW callbacks to update user input in Dear ImGui