mirror of
https://github.com/Drezil/imgui.git
synced 2025-07-04 20:18:47 +02:00
Nav/Examples: honoring the io.WantMoveMouse flag in most common examples (#323)
Missing support Vulkan (#549), Apple (#575, #247), SDL (#58, #356), Allegro, Marmalade (#368, #375)
This commit is contained in:
@ -349,6 +349,14 @@ void ImGui_ImplDX9_NewFrame()
|
||||
// io.MouseDown : filled by WM_*BUTTON* events
|
||||
// io.MouseWheel : filled by WM_MOUSEWHEEL events
|
||||
|
||||
// Set OS mouse position if requested last frame by io.WantMoveMouse flag (used when io.NavMovesTrue is enabled by user and using directional navigation)
|
||||
if (io.WantMoveMouse)
|
||||
{
|
||||
POINT pos = { (int)io.MousePos.x, (int)io.MousePos.y };
|
||||
ClientToScreen(g_hWnd, &pos);
|
||||
SetCursorPos(pos.x, pos.y);
|
||||
}
|
||||
|
||||
// Hide OS mouse cursor if ImGui is drawing it
|
||||
if (io.MouseDrawCursor)
|
||||
SetCursor(NULL);
|
||||
|
Reference in New Issue
Block a user