From edfeba3be8e3da7b435e26c61d30dc3050a626fd Mon Sep 17 00:00:00 2001 From: Ennea Date: Mon, 26 Feb 2024 19:02:05 +0100 Subject: [PATCH] map: use the game's ToggleWorldMap() to open the map This ensures that the UI's layout handling code runs, allowing players to close the map with the escape key. --- map.lua | 4 +++- tracker.lua | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/map.lua b/map.lua index 4a62b28..10df52c 100644 --- a/map.lua +++ b/map.lua @@ -409,7 +409,9 @@ end function pfMap:ShowMapID(map) if map then - WorldMapFrame:Show() + if not WorldMapFrame:IsShown() then + ToggleWorldMap() + end pfMap:SetMapByID(map) pfMap:UpdateNodes() return true diff --git a/tracker.lua b/tracker.lua index 82bb991..a546012 100644 --- a/tracker.lua +++ b/tracker.lua @@ -269,7 +269,7 @@ function tracker.ButtonClick() pfQuest.updateQuestGivers = true elseif IsControlKeyDown() and not WorldMapFrame:IsShown() then -- show world map - WorldMapFrame:Show() + ToggleWorldMap() elseif IsControlKeyDown() and pfQuest_config["spawncolors"] == "0" then -- switch color pfQuest_colors[this.title] = { pfMap.str2rgb(this.title .. GetTime()) }