minimap/panel: consistent player coordinates

This commit is contained in:
greenya
2017-05-18 08:05:39 +02:00
committed by shagu
parent ad93d56d9f
commit 38581f724d
2 changed files with 7 additions and 5 deletions
+1 -3
View File
@@ -115,9 +115,7 @@ pfUI:RegisterModule("minimap", function ()
SetMapToCurrentZone()
local posX, posY = GetPlayerMapPosition("player")
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)
pfUI.minimapCoordinates.text:SetText(round(posX * 100, 1) .. ", " .. round(posY * 100, 1))
else
pfUI.minimapCoordinates.text:SetText("|cffffaaaaN/A")
end
+6 -2
View File
@@ -352,14 +352,18 @@ pfUI:RegisterModule("panel", function ()
function pfUI.panel:UpdateZone ()
local tooltip = function ()
local posX, posY = GetPlayerMapPosition("player")
local real = GetRealZoneText()
local sub = GetSubZoneText()
GameTooltip:ClearLines()
GameTooltip_SetDefaultAnchor(GameTooltip, this)
GameTooltip:AddLine("|cffffffff" .. real)
GameTooltip:AddLine(sub)
GameTooltip:AddLine("|cffaaaaaa" .. round(posX*100,1) .. " / " .. round(posY*100,1))
local posX, posY = GetPlayerMapPosition("player")
if posX ~= 0 and posY ~= 0 then
GameTooltip:AddLine("|cffaaaaaa" .. round(posX * 100, 1) .. ", " .. round(posY * 100, 1))
end
GameTooltip:Show()
end