[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 authored and Geoffrey McRae committed 2021-08-04 10:52:05 +10:00
1 parent 8ebaf92006
commit 0941bd0fe5
1 file changed
+10 -7
+10 -7
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;