[client] imgui: move cursor change to after rendering overlays

This allows it to take into the overlays into consideration when deciding
which cursor is to be shown.
This commit is contained in:
Quantum 2021-08-03 20:45:11 -04:00 committed by Geoffrey McRae
parent 8ebaf92006
commit 0941bd0fe5

View File

@ -771,13 +771,6 @@ int app_renderOverlay(struct Rect * rects, int maxRects)
// bool test;
// igShowDemoWindow(&test);
ImGuiMouseCursor cursor = igGetMouseCursor();
if (cursor != g_state.cursorLast)
{
g_state.ds->setPointer(mapImGuiCursor(cursor));
g_state.cursorLast = cursor;
}
}
// render the overlays
@ -822,6 +815,16 @@ int app_renderOverlay(struct Rect * rects, int maxRects)
overlay->lastRectCount = written;
}
if (g_state.overlayInput)
{
ImGuiMouseCursor cursor = igGetMouseCursor();
if (cursor != g_state.cursorLast)
{
g_state.ds->setPointer(mapImGuiCursor(cursor));
g_state.cursorLast = cursor;
}
}
igRender();
return totalDamage ? -1 : totalRects;