From d3a3f8d4fa4cb9f5274de7bf08d2e90190aea0ff Mon Sep 17 00:00:00 2001 From: p3lim-52096 Date: Wed, 21 Jan 2009 20:47:03 +0000 Subject: [PATCH] Fixed castbar time fontstring git-svn-id: svn://svn.wowinterface.com/oUF_P3lim-52/trunk@53 8c7459ed-49dc-4bc8-85d7-b6381a8f5413 --- oUF_P3lim/oUF_P3lim.lua | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/oUF_P3lim/oUF_P3lim.lua b/oUF_P3lim/oUF_P3lim.lua index fbb227f..4f98bf0 100644 --- a/oUF_P3lim/oUF_P3lim.lua +++ b/oUF_P3lim/oUF_P3lim.lua @@ -177,6 +177,14 @@ local function PostUpdatePower(self, event, unit, bar, min, max) if(self.Info) then UpdateInfoColor(self.Info, unit) end end +local function OverrideCastbarTime(self, duration) + if(self.channeling) then + self.Time:SetFormattedText('%.1f ', duration) + elseif(self.casting) then + self.Time:SetFormattedText('%.1f ', self.max - duration) + end +end + local function PostCreateAuraIcon(self, button, icons) icons.showDebuffType = true button.cd:SetReverse() @@ -423,6 +431,7 @@ local function CreateStyle(self, unit) self.Castbar.Time = self.Castbar:CreateFontString(nil, 'OVERLAY', 'GameFontHighlightSmallRight') self.Castbar.Time:SetPoint('RIGHT', self.Castbar, -2, -1) + self.Castbar.CustomTimeText = OverrideCastbarTime self.Castbar.bg = self.Castbar:CreateTexture(nil, 'BORDER') self.Castbar.bg:SetAllPoints(self.Castbar) -- 1.7.9.5