Examples: Mouse cursor handling comments/tweaks to homogenize. (#1495)

This commit is contained in:
omar
2018-02-20 14:23:22 +01:00
parent d534207622
commit daddd09cd5
5 changed files with 38 additions and 32 deletions

View File

@ -452,7 +452,7 @@ void ImGui_ImplGlfwGL3_NewFrame()
g_MouseJustPressed[i] = false;
}
// Update mouse cursor
// Update OS/hardware mouse cursor if imgui isn't drawing a software cursor
ImGuiMouseCursor cursor = ImGui::GetMouseCursor();
if (io.MouseDrawCursor || cursor == ImGuiMouseCursor_None)
{
@ -460,8 +460,8 @@ void ImGui_ImplGlfwGL3_NewFrame()
}
else
{
glfwSetInputMode(g_Window, GLFW_CURSOR, GLFW_CURSOR_NORMAL);
glfwSetCursor(g_Window, g_MouseCursors[cursor] ? g_MouseCursors[cursor] : g_MouseCursors[ImGuiMouseCursor_Arrow]);
glfwSetInputMode(g_Window, GLFW_CURSOR, GLFW_CURSOR_NORMAL);
}
// Gamepad navigation mapping [BETA]