Yeah I tried. However, I still don't really get it, yet.
I don't know how to call for a second CustomTimeText, without the first one being "overwritten". Using the default time text (for casting time), creating a second fontstring and overwriting the second one with the CustomTimeText doesn't seem to work either, since once I call for
Code:
self.Castbar.CustomTimeText = CustomTimeText
it overwrites all castbar fontstrings, it seems.
Last Thing I tried was this:
Code:
local function CustomTimeText(self, duration)
if self.casting then
self.Time:SetFormattedText('%.1f / ', (self.max - duration))
elseif self.channeling then
self.Time:SetFormattedText('%.1f / ', duration)
end
end
local function CustomTimeText2(self, duration)
if self.casting then
self.Time:SetFormattedText('%.1f', self.max)
elseif self.channeling then
self.Time:SetFormattedText('%.1f', self.max)
end
end
and
Code:
self.Castbar.Time = self.Castbar:CreateFontString(nil, 'OVERLAY')
self.Castbar.Time:SetPoint('RIGHT', self.Castbar, 0, 18)
self.Castbar.Time:SetFont(font, fontS, fontF)
self.Castbar.Time:SetTextColor(1, 1, 1)
self.Castbar.Time:SetJustifyH('RIGHT')
self.Castbar.CustomTimeText = CustomTimeText
self.Castbar.Time2 = self.Castbar:CreateFontString(nil, 'OVERLAY')
self.Castbar.Time2:SetPoint('RIGHT', self.Castbar, 20, 8)
self.Castbar.Time2:SetFont(font, fontS, fontF)
self.Castbar.Time2:SetTextColor(1, 1, 1)
self.Castbar.Time2:SetJustifyH('RIGHT')
self.Castbar.CustomTimeText2 = CustomTimeText2
Which simply ignores CustomTimeText2 (removing the 2) results in printing the second CustomTimeText, but overwriting, thus "hiding" the first one and showing the static overall cast time....
What am I doing wrong?