From 753790ae47db5cfcad81fa28d26a7e2505622a80 Mon Sep 17 00:00:00 2001 From: Kelsi Date: Tue, 10 Mar 2026 05:52:55 -0700 Subject: [PATCH] ui: show persistent zone name above minimap Draws the current zone name centered above the minimap circle using a gold-colored 12pt label with drop shadow. This gives players a constant location reference without needing to trigger the full-screen zone flash. Uses getForegroundDrawList so it renders above the minimap texture. --- src/ui/game_screen.cpp | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/src/ui/game_screen.cpp b/src/ui/game_screen.cpp index 8467a5d1..e259ba2f 100644 --- a/src/ui/game_screen.cpp +++ b/src/ui/game_screen.cpp @@ -8510,6 +8510,22 @@ void GameScreen::renderMinimapMarkers(game::GameHandler& gameHandler) { } }; + // Zone name label above the minimap (centered, WoW-style) + { + const std::string& zoneName = renderer ? renderer->getCurrentZoneName() : std::string{}; + if (!zoneName.empty()) { + auto* fgDl = ImGui::GetForegroundDrawList(); + float zoneTextY = centerY - mapRadius - 16.0f; + ImFont* font = ImGui::GetFont(); + ImVec2 tsz = font->CalcTextSizeA(12.0f, FLT_MAX, 0.0f, zoneName.c_str()); + float tzx = centerX - tsz.x * 0.5f; + fgDl->AddText(font, 12.0f, ImVec2(tzx + 1.0f, zoneTextY + 1.0f), + IM_COL32(0, 0, 0, 180), zoneName.c_str()); + fgDl->AddText(font, 12.0f, ImVec2(tzx, zoneTextY), + IM_COL32(255, 220, 120, 230), zoneName.c_str()); + } + } + // Speaker mute button at the minimap top-right corner ImGui::SetNextWindowPos(ImVec2(centerX + mapRadius - 26.0f, centerY - mapRadius + 4.0f), ImGuiCond_Always); ImGui::SetNextWindowSize(ImVec2(22.0f, 22.0f), ImGuiCond_Always);