/trunk
end |
end |
local throttle = 0 |
local throttle, posData = 0 |
local function UpdateCoords(self, elapsed) |
throttle = throttle + elapsed |
if throttle >= .3 then |
local mapID = GetBestMapForUnit("player") |
local posData = GetPlayerMapPosition(mapID, "player") |
posData = GetPlayerMapPosition(mapID, "player") --posData:GetXY() ? |
if posData then |
coords:SetFormattedText("%.1f/%.1f", posData.x*100, posData.y*100) |
else |
ChatFrame1EditBox:SetFocus() |
ChatFrame1EditBox:Insert("["..coords:GetText().."]") |
else |
ToggleWorldMap() |
ToggleFrame(WorldMapFrame) |
end |
end) |
coordframe:Hide() --prevent OnUpdate from running until we're ready |
SetMapToCurrentZone() --force update for GetPlayerMapPosition() |
coordframe:SetScript("OnUpdate", UpdateCoords) |
if db.coords then |
coordframe:Show() |
## Title: PocketPlot |
## Author: Seerah |
## Notes: Minimap customization |
## Version: 3.1.1 |
## Version: 3.1 |
## OptionalDeps: Ace3, LibSharedMedia-3.0, AceGUI-3.0-SharedMediaWidgets |
## SavedVariables: PocketPlotDB |
## SavedVariablesPerCharacter: PocketPlotPCDB |