Skip to content

Commit

Permalink
map: use the game's ToggleWorldMap() to open the map
Browse files Browse the repository at this point in the history
This ensures that the UI's layout handling code runs, allowing players to close the map with the escape key.
  • Loading branch information
Ennea authored Feb 26, 2024
1 parent a66b075 commit edfeba3
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 3 additions & 1 deletion map.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion tracker.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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()) }
Expand Down

0 comments on commit edfeba3

Please sign in to comment.