You define within your layout (if you want them to be custom):
self.Castbar.CustomTimeText
self.Castbar.CustomDelayText
and
self.Castbar.Time which is a font string
Here my custom time thingy:
lua Code:
local CustomCastTimeText = function(self, duration)
self.Time:SetText(("%.1f / %.2f"):format(self.channeling and duration or self.max - duration, self.max))
end
ns.CustomCastTimeText = CustomCastTimeText
local CustomCastDelayText = function(self, duration)
self.Time:SetText(("%.1f |cffaf5050%s %.1f|r"):format(self.channeling and duration or self.max - duration, self.channeling and "- " or "+", self.delay))
end
ns.CustomCastDelayText = CustomCastDelayText
In order to show/hide them I use a script like that:
lua Code:
self.Castbar:HookScript("OnShow", function() self.Castbar.Text:Show(); self.Castbar.Time:Show() end)
self.Castbar:HookScript("OnHide", function() self.Castbar.Text:Hide(); self.Castbar.Time:Hide() end)
(self.Castbar.Text is the font string for the spell name on the castbar)
Hopefully this helps.