diff --git a/pMinimap_Coords/pMinimap_Coords.lua b/pMinimap_Coords/pMinimap_Coords.lua
index affabbb..9cc5e6c 100644
--- a/pMinimap_Coords/pMinimap_Coords.lua
+++ b/pMinimap_Coords/pMinimap_Coords.lua
@@ -1 +1 @@
-local total, font, size = 0, MiniMapMailText:GetFont()
MiniMapCoords = CreateFrame('Frame', 'MiniMapCoord', Minimap)
MiniMapCoords:SetWidth(40)
MiniMapCoords:SetHeight(14)
MiniMapCoords:Show()
if(GetCVar('showClock') == '1') then
MiniMapCoords:SetPoint('BOTTOMRIGHT', Minimap)
else
MiniMapCoords:SetPoint('BOTTOM', Minimap)
end
MiniMapCoordText = MiniMapCoords:CreateFontString('MiniMapCoordText', 'OVERLAY')
MiniMapCoordText:SetPoint('CENTER', MiniMapCoords)
MiniMapCoordText:SetFont(font, size, 'OUTLINE')
MiniMapCoordText:SetTextColor(1, 1, 1)
MiniMapCoord:SetScript('OnUpdate', function(self, elapsed)
total = total + elapsed
if(total > 0.25) then
if(IsInInstance()) then
MiniMapCoordText:SetText()
else
local x, y = GetPlayerMapPosition('player')
MiniMapCoordText:SetFormattedText('%.0f,%.0f', x*100, y*100)
end
total = 0
end
end)
local handler = CreateFrame('Frame')
handler:RegisterEvent('ZONE_CHANGED_NEW_AREA')
handler:SetScript('OnEvent', function()
SetMapToCurrentZone()
end)
\ No newline at end of file
+local db = _G.pMinimapDB or {point = {'TOPRIGHT', UIParent, 'TOPRIGHT', -15, -15}, scale = 0.9, offset = 1, colors = {0, 0, 0}, durability = true, coords = false, clock = true}
local total, font, size = 0, MiniMapMailText:GetFont()
MiniMapCoords = CreateFrame('Frame', 'MiniMapCoord', Minimap)
MiniMapCoords:SetWidth(40)
MiniMapCoords:SetHeight(14)
MiniMapCoords:Show()
if(db.clock) then
MiniMapCoords:SetPoint('BOTTOMRIGHT', Minimap)
else
MiniMapCoords:SetPoint('BOTTOM', Minimap)
end
MiniMapCoordText = MiniMapCoords:CreateFontString('MiniMapCoordText', 'OVERLAY')
MiniMapCoordText:SetPoint('CENTER', MiniMapCoords)
MiniMapCoordText:SetFont(font, size, 'OUTLINE')
MiniMapCoordText:SetTextColor(1, 1, 1)
MiniMapCoord:SetScript('OnUpdate', function(self, elapsed)
total = total + elapsed
if(total > 0.25) then
if(IsInInstance()) then
MiniMapCoordText:SetText()
else
local x, y = GetPlayerMapPosition('player')
MiniMapCoordText:SetFormattedText('%.0f,%.0f', x*100, y*100)
end
total = 0
end
end)
local handler = CreateFrame('Frame')
handler:RegisterEvent('ZONE_CHANGED_NEW_AREA')
handler:SetScript('OnEvent', function()
SetMapToCurrentZone()
end)
\ No newline at end of file