Added more options
p3lim-52096 [10-24-08 - 14:58]
Added more options
git-svn-id: svn://svn.wowinterface.com/pMinimap-54/trunk@39 ae24c21f-2f0c-4c94-9256-0092abe71e0d
diff --git a/pMinimap_Clock/pMinimap_Clock.lua b/pMinimap_Clock/pMinimap_Clock.lua
index c610c8c..d736bd6 100644
--- a/pMinimap_Clock/pMinimap_Clock.lua
+++ b/pMinimap_Clock/pMinimap_Clock.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}
if(not IsAddOnLoaded('Blizzard_TimeManager')) then
LoadAddOn('Blizzard_TimeManager')
end
SetCVar('showClock', '1', 'SHOW_CLOCK')
pMinimapToggleClock('1')
TimeManagerClockButton:ClearAllPoints()
if(db.coords) then
TimeManagerClockButton:SetPoint('BOTTOMLEFT', Minimap)
else
TimeManagerClockButton:SetPoint('BOTTOM', Minimap)
end
TimeManagerClockButton:SetWidth(40)
TimeManagerClockButton:SetHeight(14)
TimeManagerClockButton:GetRegions():Hide()
TimeManagerClockTicker:SetPoint('CENTER', TimeManagerClockButton)
TimeManagerClockTicker:SetFont([=[Interface\AddOns\pMinimap\font.ttf]=], 13, 'OUTLINE')
TimeManagerAlarmFiredTexture.Show = function() TimeManagerClockTicker:SetTextColor(1, 0, 0) end
TimeManagerAlarmFiredTexture.Hide = function() TimeManagerClockTicker:SetTextColor(1, 1, 1) end
TimeManagerClockButton:SetScript('OnClick', function(self, button)
if(self.alarmFiring) then
PlaySound('igMainMenuQuit')
TimeManager_TurnOffAlarm()
else
if(button == 'RightButton') then
if(not IsAddOnLoaded('Blizzard_Calendar')) then
LoadAddOn('Blizzard_Calendar')
end
ToggleCalendar()
else
ToggleTimeManager()
end
end
end)
\ No newline at end of file
+if(not IsAddOnLoaded('Blizzard_TimeManager')) then
LoadAddOn('Blizzard_TimeManager')
end
SetCVar('showClock', '1', 'SHOW_CLOCK')
pMinimapToggleClock('1')
TimeManagerClockButton:ClearAllPoints()
if(pMinimapDB.coords) then
TimeManagerClockButton:SetPoint('BOTTOMLEFT', Minimap)
else
TimeManagerClockButton:SetPoint('BOTTOM', Minimap)
end
TimeManagerClockButton:SetWidth(40)
TimeManagerClockButton:SetHeight(14)
TimeManagerClockButton:GetRegions():Hide()
TimeManagerClockTicker:SetPoint('CENTER', TimeManagerClockButton)
TimeManagerClockTicker:SetFont(pMinimapDB.font, pMinimapDB.fontsize, pMinimapDB.fontflag == 'NONE' and nil or pMinimapDB.fontflag)
TimeManagerAlarmFiredTexture.Show = function() TimeManagerClockTicker:SetTextColor(1, 0, 0) end
TimeManagerAlarmFiredTexture.Hide = function() TimeManagerClockTicker:SetTextColor(1, 1, 1) end
TimeManagerClockButton:SetScript('OnClick', function(self, button)
if(self.alarmFiring) then
PlaySound('igMainMenuQuit')
TimeManager_TurnOffAlarm()
else
if(button == 'RightButton') then
if(not IsAddOnLoaded('Blizzard_Calendar')) then
LoadAddOn('Blizzard_Calendar')
end
ToggleCalendar()
else
ToggleTimeManager()
end
end
end)
\ No newline at end of file