mirror of
https://github.com/gnif/LookingGlass.git
synced 2024-12-25 23:13:39 +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
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user