mirror of
https://github.com/Drezil/imgui.git
synced 2024-11-15 09:27:00 +00:00
Nav: Fixed a crash with IMGUI_DEBUG_NAV_SCORING enabled + added info to Metrics.
This commit is contained in:
parent
200754b013
commit
e5ba982be0
@ -2338,7 +2338,9 @@ static void NavRestoreLayer(int layer)
|
||||
static inline void NavUpdateAnyRequestFlag()
|
||||
{
|
||||
ImGuiContext& g = *GImGui;
|
||||
g.NavAnyRequest = g.NavMoveRequest || g.NavInitRequest || IMGUI_DEBUG_NAV_SCORING;
|
||||
g.NavAnyRequest = g.NavMoveRequest || g.NavInitRequest || (IMGUI_DEBUG_NAV_SCORING && g.NavWindow != NULL);
|
||||
if (g.NavAnyRequest)
|
||||
IM_ASSERT(g.NavWindow != NULL);
|
||||
}
|
||||
|
||||
static bool NavMoveRequestButNoResultYet()
|
||||
@ -14095,6 +14097,7 @@ void ImGui::ShowMetricsWindow(bool* p_open)
|
||||
ImGui::Text("HoveredId: 0x%08X/0x%08X (%.2f sec)", g.HoveredId, g.HoveredIdPreviousFrame, g.HoveredIdTimer); // Data is "in-flight" so depending on when the Metrics window is called we may see current frame information or not
|
||||
ImGui::Text("ActiveId: 0x%08X/0x%08X (%.2f sec), ActiveIdSource: %s", g.ActiveId, g.ActiveIdPreviousFrame, g.ActiveIdTimer, input_source_names[g.ActiveIdSource]);
|
||||
ImGui::Text("ActiveIdWindow: '%s'", g.ActiveIdWindow ? g.ActiveIdWindow->Name : "NULL");
|
||||
ImGui::Text("MovingWindow: '%s'", g.MovingWindow ? g.MovingWindow->Name : "NULL");
|
||||
ImGui::Text("NavWindow: '%s'", g.NavWindow ? g.NavWindow->Name : "NULL");
|
||||
ImGui::Text("NavId: 0x%08X, NavLayer: %d", g.NavId, g.NavLayer);
|
||||
ImGui::Text("NavInputSource: %s", input_source_names[g.NavInputSource]);
|
||||
|
Loading…
Reference in New Issue
Block a user