mirror of
https://github.com/brues-code/pfUI.git
synced 2026-10-25 21:40:49 +00:00
minimap: do not show zero coords
This commit is contained in:
+8
-3
@@ -86,9 +86,14 @@ pfUI:RegisterModule("minimap", function ()
|
|||||||
Minimap:SetScript("OnEnter", function()
|
Minimap:SetScript("OnEnter", function()
|
||||||
SetMapToCurrentZone()
|
SetMapToCurrentZone()
|
||||||
local posX, posY = GetPlayerMapPosition("player")
|
local posX, posY = GetPlayerMapPosition("player")
|
||||||
local roundedX = ceil(posX * 1000)/10
|
if posX ~= 0 and posY ~= 0 then
|
||||||
local roundedY = ceil(posY * 1000)/10
|
local roundedX = ceil(posX * 1000)/10
|
||||||
pfUI.minimapCoordinates.text:SetText(roundedX..", "..roundedY)
|
local roundedY = ceil(posY * 1000)/10
|
||||||
|
pfUI.minimapCoordinates.text:SetText(roundedX..", "..roundedY)
|
||||||
|
else
|
||||||
|
pfUI.minimapCoordinates.text:SetText("|cffffaaaaN/A")
|
||||||
|
end
|
||||||
|
|
||||||
pfUI.minimapCoordinates:Show()
|
pfUI.minimapCoordinates:Show()
|
||||||
end)
|
end)
|
||||||
Minimap:SetScript("OnLeave", function()
|
Minimap:SetScript("OnLeave", function()
|
||||||
|
|||||||
Reference in New Issue
Block a user