Mercurial > wow > buffalo2
comparison TimeManager/TimeManager.lua @ 47:1a322b92dbfa
file cleanup
| author | Nenue |
|---|---|
| date | Thu, 28 Apr 2016 05:54:21 -0400 |
| parents | |
| children | ed74c5cabe98 |
comparison
equal
deleted
inserted
replaced
| 46:aa693607b813 | 47:1a322b92dbfa |
|---|---|
| 1 -------------------------------------------- | |
| 2 -- Veneer | |
| 3 -- Krakyn | |
| 4 -- @project-revision@ @project-hash@ | |
| 5 -- @file-revision@ @file-hash@ | |
| 6 -- Created: 4/27/2016 1:02 AM | |
| 7 -------------------------------------------- | |
| 8 | |
| 9 local B, _G = select(2,...).frame, _G | |
| 10 local clock = B:RegisterModule("Clock", VeneerClock) | |
| 11 local weekDays = {'Su', 'M', 'T', 'W', 'R' ,'F', 'Sa' } | |
| 12 | |
| 13 local print = B.print('XML') | |
| 14 | |
| 15 clock.OnUpdate = function(self) | |
| 16 local weekday, month, day, year = CalendarGetDate() | |
| 17 local hour, min = GetGameTime() | |
| 18 if hour > 12 then | |
| 19 hour = hour - 12 | |
| 20 end | |
| 21 self.time:SetFormattedText("|cAAFFFFFF%s|r |cFF44FFFF%s|r|c88FFFFFF/|r|cFF44FFFF%s|r %d:%02d", weekDays[weekday], month, day, hour, min) | |
| 22 end | |
| 23 | |
| 24 clock.OnMouseUp = function(self, button) | |
| 25 if button == 'RightButton' then | |
| 26 if self:IsVisible() then | |
| 27 self:Hide() | |
| 28 else | |
| 29 self:Show() | |
| 30 end | |
| 31 end | |
| 32 end | |
| 33 | |
| 34 function clock:OnInitialize() | |
| 35 print('clock thing') | |
| 36 self:Show() | |
| 37 end |
