Added more options
p3lim-52096 [10-24-08 - 14:58]
Added more options
git-svn-id: svn://svn.wowinterface.com/pMinimap-54/trunk@41 ae24c21f-2f0c-4c94-9256-0092abe71e0d
diff --git a/pMinimap_Coords/pMinimap_Coords.lua b/pMinimap_Coords/pMinimap_Coords.lua
index 9cc5e6c..dd9d723 100644
--- a/pMinimap_Coords/pMinimap_Coords.lua
+++ b/pMinimap_Coords/pMinimap_Coords.lua
@@ -1 +1 @@
-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
+MiniMapCoords = CreateFrame('Frame', 'MiniMapCoord', Minimap)
MiniMapCoords:SetWidth(40)
MiniMapCoords:SetHeight(14)
MiniMapCoords:Show()
if(pMinimapDB.clock) then
MiniMapCoords:SetPoint('BOTTOMRIGHT', Minimap)
else
MiniMapCoords:SetPoint('BOTTOM', Minimap)
end
MiniMapCoordText = MiniMapCoords:CreateFontString('MiniMapCoordText', 'OVERLAY')
MiniMapCoordText:SetPoint('CENTER', MiniMapCoords)
MiniMapCoordText:SetFont(pMinimapDB.font, pMinimapDB.fontsize, pMinimapDB.fontflag == 'NONE' and nil or pMinimap.fontflag)
MiniMapCoordText:SetTextColor(1, 1, 1)
local total = 0
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