mirror of
https://github.com/brues-code/pfUI.git
synced 2026-10-03 04:00:02 +00:00
minimap/panel: consistent player coordinates
This commit is contained in:
+1
-3
@@ -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
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user