Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- { name = "Clock", parent = "Minimap", anchor_to = "bottomright", height = 17,
- text = {
- string = function()
- local hour, min, pm = GetGameTime()
- if hour > 12 then hour = hour - 12; pm = true elseif hour == 0 then hour = 12 end
- return hour..":"..format("%02.f",min)..(pm and "P" or "A")
- end, font = "04B_03__.TTF", size = 8, alpha = 0.8, justify_h = "right", justify_v = "bottom", y_off = -2,
- },
- OnEnter = function(self)
- GameTooltip:SetOwner(self, "ANCHOR_BOTTOMLEFT")
- GameTooltip:ClearLines()
- local hour, min, pm = GetGameTime()
- if hour > 12 then hour = hour - 12; pm = true elseif hour == 0 then hour = 12 end
- local rtime = hour..":"..format("%02.f",min)..(pm and "pm" or "am")
- local ltime = format("%01.f",date("%I"))..":"..date("%M")..strlower(date("%p"))
- local wgtime = GetWintergraspWaitTime() or nil
- if wgtime == nil then
- wgtime = "In Progress"
- else
- local hour = tonumber(format("%01.f", floor(wgtime/3600)))
- local min = format(hour>0 and "%02.f" or "%01.f", floor(wgtime/60 - (hour*60)))
- local sec = format("%02.f", floor(wgtime - hour*3600 - min *60))
- wgtime = (hour>0 and hour..":" or "")..min..":"..sec
- end
- GameTooltip:AddLine(date("%A, %B %d"),0.4,0.78,1)
- GameTooltip:AddLine(" ")
- GameTooltip:AddDoubleLine("Local Time",ltime,0.75,0.9,1,1,1,1)
- GameTooltip:AddDoubleLine("Realm Time",rtime,0.75,0.9,1,1,1,1)
- GameTooltip:AddLine(" ")
- GameTooltip:AddDoubleLine("Time to Wintergrasp",wgtime,0.75,0.9,1,1,1,1)
- GameTooltip:Show()
- end,
- OnLeave = HideTT,
- OnClick = function(_,b) (b == "RightButton" and ToggleTimeManager or ToggleCalendar)() end
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement