Quantcast

Update to match core

p3lim-52096 [11-02-08 - 01:16]
Update to match core

git-svn-id: svn://svn.wowinterface.com/pMinimap-54/trunk@46 ae24c21f-2f0c-4c94-9256-0092abe71e0d
Filename
pMinimap_Coords/pMinimap_Coords.lua
diff --git a/pMinimap_Coords/pMinimap_Coords.lua b/pMinimap_Coords/pMinimap_Coords.lua
index dd9d723..0010b68 100644
--- a/pMinimap_Coords/pMinimap_Coords.lua
+++ b/pMinimap_Coords/pMinimap_Coords.lua
@@ -1 +1 @@
-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
+MiniMapCoords = CreateFrame('Frame', 'MiniMapCoord', Minimap)
MiniMapCoords:SetWidth(40)
MiniMapCoords:SetHeight(14)
MiniMapCoords:Show()

if(pMinimapDB2.clock) then
	MiniMapCoords:SetPoint('BOTTOMRIGHT', Minimap)
else
	MiniMapCoords:SetPoint('BOTTOM', Minimap)
end

MiniMapCoordText = MiniMapCoords:CreateFontString('MiniMapCoordText', 'OVERLAY')
MiniMapCoordText:SetPoint('CENTER', MiniMapCoords)
MiniMapCoordText:SetFont(pMinimapDB2.font, pMinimapDB2.fontsize, pMinimapDB2.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