mirror of
https://github.com/gnif/LookingGlass.git
synced 2025-01-10 22:33:58 +00:00
[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:
parent
8ebaf92006
commit
0941bd0fe5
1 changed files with 10 additions and 7 deletions
|
@ -771,13 +771,6 @@ int app_renderOverlay(struct Rect * rects, int maxRects)
|
||||||
|
|
||||||
// bool test;
|
// bool test;
|
||||||
// igShowDemoWindow(&test);
|
// igShowDemoWindow(&test);
|
||||||
|
|
||||||
ImGuiMouseCursor cursor = igGetMouseCursor();
|
|
||||||
if (cursor != g_state.cursorLast)
|
|
||||||
{
|
|
||||||
g_state.ds->setPointer(mapImGuiCursor(cursor));
|
|
||||||
g_state.cursorLast = cursor;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// render the overlays
|
// render the overlays
|
||||||
|
@ -822,6 +815,16 @@ int app_renderOverlay(struct Rect * rects, int maxRects)
|
||||||
overlay->lastRectCount = written;
|
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();
|
igRender();
|
||||||
|
|
||||||
return totalDamage ? -1 : totalRects;
|
return totalDamage ? -1 : totalRects;
|
||||||
|
|
Loading…
Reference in a new issue