Misc: Added an explicit compile-time test for non-scoped IM_ASSERT() macros to redirect users to a solution + fixed our stb wrappers.

+ Nav: Use nav layer enum, comments.
This commit is contained in:
omar
2020-04-03 12:14:03 +02:00
parent b7e1b13ca7
commit cc0d4e346a
6 changed files with 25 additions and 15 deletions

View File

@ -6178,7 +6178,7 @@ void ImGui::EndMainMenuBar()
// When the user has left the menu layer (typically: closed menus through activation of an item), we restore focus to the previous window
// FIXME: With this strategy we won't be able to restore a NULL focus.
ImGuiContext& g = *GImGui;
if (g.CurrentWindow == g.NavWindow && g.NavLayer == 0 && !g.NavAnyRequest)
if (g.CurrentWindow == g.NavWindow && g.NavLayer == ImGuiNavLayer_Main && !g.NavAnyRequest)
FocusTopMostWindowUnderOne(g.NavWindow, NULL);
End();