mirror of
https://github.com/Bluewhale1337/ElvUIModernized.git
synced 2026-07-27 08:24:44 +00:00
cleanup SetFormattedText( -> SetText(format(
This commit is contained in:
@@ -122,7 +122,7 @@ local function UpdateAuraTime(frame, expiration)
|
||||
if timervalue < 4 then
|
||||
timeFormat = E.TimeFormats[4][2]
|
||||
end
|
||||
frame.timeLeft:SetFormattedText(("%s%s|r"):format(TimeColors[formatid], timeFormat), timervalue)
|
||||
frame.timeLeft:SetText(format("%s%s|r", TimeColors[formatid], timeFormat), timervalue)
|
||||
end
|
||||
|
||||
local function RemoveAuraInstance(guid, spellID, caster)
|
||||
|
||||
@@ -22,11 +22,11 @@ function mod:UpdateElement_CastBarOnUpdate(elapsed)
|
||||
self:SetValue(self.value)
|
||||
|
||||
if self.castTimeFormat == "CURRENT" then
|
||||
self.Time:SetFormattedText("%.1f", self.value)
|
||||
self.Time:SetText(format("%.1f", self.value))
|
||||
elseif self.castTimeFormat == "CURRENT_MAX" then
|
||||
self.Time:SetFormattedText("%.1f / %.1f", self.value, self.maxValue)
|
||||
self.Time:SetText(format("%.1f / %.1f", self.value, self.maxValue))
|
||||
else --REMAINING
|
||||
self.Time:SetFormattedText("%.1f", (self.maxValue - self.value))
|
||||
self.Time:SetText(format("%.1f", (self.maxValue - self.value)))
|
||||
end
|
||||
|
||||
if self.Spark then
|
||||
@@ -42,11 +42,11 @@ function mod:UpdateElement_CastBarOnUpdate(elapsed)
|
||||
self:SetValue(self.value)
|
||||
|
||||
if self.channelTimeFormat == "CURRENT" then
|
||||
self.Time:SetFormattedText("%.1f", (self.maxValue - self.value))
|
||||
self.Time:SetText(format("%.1f", (self.maxValue - self.value)))
|
||||
elseif self.channelTimeFormat == "CURRENT_MAX" then
|
||||
self.Time:SetFormattedText("%.1f / %.1f", (self.maxValue - self.value), self.maxValue)
|
||||
self.Time:SetText(format("%.1f / %.1f", (self.maxValue - self.value), self.maxValue))
|
||||
else --REMAINING
|
||||
self.Time:SetFormattedText("%.1f", self.value)
|
||||
self.Time:SetText(format("%.1f", self.value))
|
||||
end
|
||||
elseif self.holdTime > 0 then
|
||||
self.holdTime = self.holdTime - elapsed
|
||||
|
||||
@@ -419,10 +419,10 @@ function UF:UpdateAuraTimer(elapsed)
|
||||
local timervalue, formatid
|
||||
timervalue, formatid, self.nextupdate = E:GetTimeInfo(self.expirationSaved, 4)
|
||||
if self.text:GetFont() then
|
||||
self.text:SetFormattedText(format("%s%s|r", E.TimeColors[formatid], E.TimeFormats[formatid][2]), timervalue)
|
||||
self.text:SetText(format("%s%s|r", E.TimeColors[formatid], E.TimeFormats[formatid][2]), timervalue)
|
||||
elseif self:GetParent():GetParent().db then
|
||||
self.text:FontTemplate(LSM:Fetch("font", E.db["unitframe"].font), self:GetParent():GetParent().db[self:GetParent().type].fontSize, E.db["unitframe"].fontOutline)
|
||||
self.text:SetFormattedText(format("%s%s|r", E.TimeColors[formatid], E.TimeFormats[formatid][2]), timervalue)
|
||||
E:FontTemplate(self.text, LSM:Fetch("font", E.db["unitframe"].font), self:GetParent():GetParent().db[self:GetParent().type].fontSize, E.db["unitframe"].fontOutline)
|
||||
self.text:SetText(format("%s%s|r", E.TimeColors[formatid], E.TimeFormats[formatid][2]), timervalue)
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user