From 92f13efbef70e841f10dbcefe7f20268a5f97019 Mon Sep 17 00:00:00 2001 From: Phillip Stephens Date: Sun, 30 May 2021 00:57:51 -0700 Subject: [PATCH] Add missing hasPrevious check to input overlay --- Runtime/ImGuiConsole.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Runtime/ImGuiConsole.cpp b/Runtime/ImGuiConsole.cpp index 52845e04c..8dd9c44ec 100644 --- a/Runtime/ImGuiConsole.cpp +++ b/Runtime/ImGuiConsole.cpp @@ -566,12 +566,15 @@ void ImGuiConsole::ShowDebugOverlay() { ImGui::Separator(); } ImGuiStringViewText(fmt::format(FMT_STRING("Resource Objects: {}\n"), g_SimplePool->GetLiveObjects())); + hasPrevious = true; } // Code -stolen- borrowed from Practice Mod if (m_showInput && g_InputGenerator != nullptr) { auto input = g_InputGenerator->GetLastInput(); if (input.x4_controllerIdx == 0) { - ImGui::Separator(); + if (hasPrevious) { + ImGui::Separator(); + } ImDrawList* dl = ImGui::GetWindowDrawList(); ImVec2 p = ImGui::GetCursorScreenPos(); @@ -698,6 +701,7 @@ void ImGuiConsole::ShowDebugOverlay() { } ImGui::Dummy(ImVec2(270, 130)); + hasPrevious = true; } } if (ImGui::BeginPopupContextWindow()) {