1
0
mirror of https://github.com/Drezil/imgui.git synced 2024-12-20 23:06:36 +00:00

Examples: DirectX9-10-11: Only call Windows' SetCursor(NULL) when io.MouseDrawCursor is set (, )

This commit is contained in:
ocornut 2016-11-12 19:46:52 +01:00
parent 2973287fd3
commit 7c2b35704d
3 changed files with 6 additions and 3 deletions
examples
directx10_example
directx11_example
directx9_example

View File

@ -573,7 +573,8 @@ void ImGui_ImplDX10_NewFrame()
// io.MouseWheel : filled by WM_MOUSEWHEEL events
// Hide OS mouse cursor if ImGui is drawing it
SetCursor(io.MouseDrawCursor ? NULL : LoadCursor(NULL, IDC_ARROW));
if (io.MouseDrawCursor)
SetCursor(NULL);
// Start the frame
ImGui::NewFrame();

View File

@ -576,7 +576,8 @@ void ImGui_ImplDX11_NewFrame()
// io.MouseWheel : filled by WM_MOUSEWHEEL events
// Hide OS mouse cursor if ImGui is drawing it
SetCursor(io.MouseDrawCursor ? NULL : LoadCursor(NULL, IDC_ARROW));
if (io.MouseDrawCursor)
SetCursor(NULL);
// Start the frame
ImGui::NewFrame();

View File

@ -339,7 +339,8 @@ void ImGui_ImplDX9_NewFrame()
// io.MouseWheel : filled by WM_MOUSEWHEEL events
// Hide OS mouse cursor if ImGui is drawing it
SetCursor(io.MouseDrawCursor ? NULL : LoadCursor(NULL, IDC_ARROW));
if (io.MouseDrawCursor)
SetCursor(NULL);
// Start the frame
ImGui::NewFrame();