mirror of
https://github.com/brues-code/pfUI.git
synced 2026-09-29 02:36:02 +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()
|
||||
SetMapToCurrentZone()
|
||||
local posX, posY = GetPlayerMapPosition("player")
|
||||
local roundedX = ceil(posX * 1000)/10
|
||||
local roundedY = ceil(posY * 1000)/10
|
||||
pfUI.minimapCoordinates.text:SetText(roundedX..", "..roundedY)
|
||||
if posX ~= 0 and posY ~= 0 then
|
||||
local roundedX = ceil(posX * 1000)/10
|
||||
local roundedY = ceil(posY * 1000)/10
|
||||
pfUI.minimapCoordinates.text:SetText(roundedX..", "..roundedY)
|
||||
else
|
||||
pfUI.minimapCoordinates.text:SetText("|cffffaaaaN/A")
|
||||
end
|
||||
|
||||
pfUI.minimapCoordinates:Show()
|
||||
end)
|
||||
Minimap:SetScript("OnLeave", function()
|
||||
|
||||
Reference in New Issue
Block a user