Nenue@47: -------------------------------------------- Nenue@47: -- Veneer Nenue@47: -- Krakyn Nenue@47: -- @project-revision@ @project-hash@ Nenue@47: -- @file-revision@ @file-hash@ Nenue@47: -- Created: 4/27/2016 1:02 AM Nenue@47: -------------------------------------------- Nenue@47: Nenue@47: local B, _G = select(2,...).frame, _G Nenue@47: local clock = B:RegisterModule("Clock", VeneerClock) Nenue@47: local weekDays = {'Su', 'M', 'T', 'W', 'R' ,'F', 'Sa' } Nenue@47: Nenue@47: local print = B.print('XML') Nenue@47: Nenue@47: clock.OnUpdate = function(self) Nenue@47: local weekday, month, day, year = CalendarGetDate() Nenue@47: local hour, min = GetGameTime() Nenue@47: if hour > 12 then Nenue@47: hour = hour - 12 Nenue@47: end Nenue@47: self.time:SetFormattedText("|cAAFFFFFF%s|r |cFF44FFFF%s|r|c88FFFFFF/|r|cFF44FFFF%s|r %d:%02d", weekDays[weekday], month, day, hour, min) Nenue@47: end Nenue@47: Nenue@47: clock.OnMouseUp = function(self, button) Nenue@47: if button == 'RightButton' then Nenue@47: if self:IsVisible() then Nenue@47: self:Hide() Nenue@47: else Nenue@47: self:Show() Nenue@47: end Nenue@47: end Nenue@47: end Nenue@47: Nenue@47: function clock:OnInitialize() Nenue@47: print('clock thing') Nenue@47: self:Show() Nenue@47: end