mirror of
https://github.com/ocornut/imgui.git
synced 2026-01-21 01:44:21 +00:00
Examples: Mouse cursor handling comments/tweaks to homogenize. (#1495)
This commit is contained in:
parent
d534207622
commit
daddd09cd5
5 changed files with 38 additions and 32 deletions
|
|
@ -864,7 +864,7 @@ void ImGui_ImplGlfwVulkan_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)
|
||||
{
|
||||
|
|
@ -872,8 +872,8 @@ void ImGui_ImplGlfwVulkan_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);
|
||||
}
|
||||
|
||||
// Start the frame. This call will update the io.WantCaptureMouse, io.WantCaptureKeyboard flag that you can use to dispatch inputs (or not) to your application.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue