From bed05b1357598affc4709cc3ccaa9a7a3894003f Mon Sep 17 00:00:00 2001 From: Luke Street Date: Sun, 30 May 2021 19:57:18 -0400 Subject: [PATCH] Add area ID/name to Area Info debug overlay --- Runtime/ImGuiConsole.cpp | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/Runtime/ImGuiConsole.cpp b/Runtime/ImGuiConsole.cpp index b5e43cc04..d5a8f1eda 100644 --- a/Runtime/ImGuiConsole.cpp +++ b/Runtime/ImGuiConsole.cpp @@ -578,10 +578,15 @@ void ImGuiConsole::ShowDebugOverlay() { layerBits += "0"; } } - ImGuiStringViewText(fmt::format(FMT_STRING("Area AssetId: 0x{}, Total Objects: {}\n" + CGameArea* pArea = g_StateManager->GetWorld()->GetArea(aId); + CAssetId stringId = pArea->IGetStringTableAssetId(); + if (!stringTables.contains(stringId)) { + stringTables[stringId] = g_SimplePool->GetObj(SObjectTag{SBIG('STRG'), stringId}); + } + ImGuiStringViewText(fmt::format(FMT_STRING("Area ID: {} Name: {}\nArea AssetId: 0x{}, Total Objects: {}\n" "Active Layer bits: {}\n"), - g_StateManager->GetWorld()->GetArea(aId)->GetAreaAssetId(), - g_StateManager->GetAllObjectList().size(), layerBits)); + pArea->GetAreaId(), ReadUtf8String(stringTables[stringId].GetObj(), 0), + pArea->GetAreaAssetId(), g_StateManager->GetAllObjectList().size(), layerBits)); hasPrevious = true; } }