mirror of
https://github.com/Drezil/imgui.git
synced 2024-11-15 01:17:00 +00:00
Nav: Made NavWindow always refresh from NavId so we can lazily retrieve the window for user functions that don't have it. This is not required by current commit but I'd rather test it earlier. Idea: eventually if we switch to 64-bit identifiers we could reserve e.g. 20 bits to store a simplified window identifier so we can always retrieve a window from an id. (#787)
This commit is contained in:
parent
f0d437dd9c
commit
b05b31e690
@ -2224,6 +2224,7 @@ static void NavProcessItem(ImGuiWindow* window, const ImRect& nav_bb, const ImGu
|
||||
if (g.NavId == id)
|
||||
{
|
||||
window->NavRectRel[window->DC.NavLayerCurrent] = nav_bb_rel;
|
||||
g.NavWindow = window; // Always refresh g.NavWindow, because some operations such as FocusItem() don't have a window.
|
||||
g.NavIdIsAlive = true;
|
||||
g.NavIdTabCounter = window->FocusIdxTabCounter;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user