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:
@@ -120,7 +120,7 @@ function D:OnCommReceived(prefix, msg, dist, sender)
|
|||||||
OnAccept = function()
|
OnAccept = function()
|
||||||
self.statusBar:SetMinMaxValues(0, length)
|
self.statusBar:SetMinMaxValues(0, length)
|
||||||
self.statusBar:SetValue(0)
|
self.statusBar:SetValue(0)
|
||||||
self.statusBar.text:SetFormattedText(L["Data From: %s"], sender)
|
self.statusBar.text:SetText(format(L["Data From: %s"], sender))
|
||||||
E:StaticPopupSpecial_Show(self.statusBar)
|
E:StaticPopupSpecial_Show(self.statusBar)
|
||||||
self:SendCommMessage(REPLY_PREFIX, profile..":YES", dist, sender)
|
self:SendCommMessage(REPLY_PREFIX, profile..":YES", dist, sender)
|
||||||
end,
|
end,
|
||||||
|
|||||||
@@ -122,7 +122,7 @@ local function SetPage(PageNum, PrevPage)
|
|||||||
end
|
end
|
||||||
|
|
||||||
f.Pages[f.CurrentPage]()
|
f.Pages[f.CurrentPage]()
|
||||||
f.Status.text:SetFormattedText("%d / %d", f.CurrentPage, f.MaxPage)
|
f.Status.text:SetText(format("%d / %d", f.CurrentPage, f.MaxPage))
|
||||||
if f.StepTitles then
|
if f.StepTitles then
|
||||||
for i = 1, getn(f.side.Lines) do
|
for i = 1, getn(f.side.Lines) do
|
||||||
local b = f.side.Lines[i]
|
local b = f.side.Lines[i]
|
||||||
|
|||||||
@@ -122,7 +122,7 @@ local function UpdateAuraTime(frame, expiration)
|
|||||||
if timervalue < 4 then
|
if timervalue < 4 then
|
||||||
timeFormat = E.TimeFormats[4][2]
|
timeFormat = E.TimeFormats[4][2]
|
||||||
end
|
end
|
||||||
frame.timeLeft:SetFormattedText(("%s%s|r"):format(TimeColors[formatid], timeFormat), timervalue)
|
frame.timeLeft:SetText(format("%s%s|r", TimeColors[formatid], timeFormat), timervalue)
|
||||||
end
|
end
|
||||||
|
|
||||||
local function RemoveAuraInstance(guid, spellID, caster)
|
local function RemoveAuraInstance(guid, spellID, caster)
|
||||||
|
|||||||
@@ -22,11 +22,11 @@ function mod:UpdateElement_CastBarOnUpdate(elapsed)
|
|||||||
self:SetValue(self.value)
|
self:SetValue(self.value)
|
||||||
|
|
||||||
if self.castTimeFormat == "CURRENT" then
|
if self.castTimeFormat == "CURRENT" then
|
||||||
self.Time:SetFormattedText("%.1f", self.value)
|
self.Time:SetText(format("%.1f", self.value))
|
||||||
elseif self.castTimeFormat == "CURRENT_MAX" then
|
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
|
else --REMAINING
|
||||||
self.Time:SetFormattedText("%.1f", (self.maxValue - self.value))
|
self.Time:SetText(format("%.1f", (self.maxValue - self.value)))
|
||||||
end
|
end
|
||||||
|
|
||||||
if self.Spark then
|
if self.Spark then
|
||||||
@@ -42,11 +42,11 @@ function mod:UpdateElement_CastBarOnUpdate(elapsed)
|
|||||||
self:SetValue(self.value)
|
self:SetValue(self.value)
|
||||||
|
|
||||||
if self.channelTimeFormat == "CURRENT" then
|
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
|
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
|
else --REMAINING
|
||||||
self.Time:SetFormattedText("%.1f", self.value)
|
self.Time:SetText(format("%.1f", self.value))
|
||||||
end
|
end
|
||||||
elseif self.holdTime > 0 then
|
elseif self.holdTime > 0 then
|
||||||
self.holdTime = self.holdTime - elapsed
|
self.holdTime = self.holdTime - elapsed
|
||||||
|
|||||||
@@ -419,10 +419,10 @@ function UF:UpdateAuraTimer(elapsed)
|
|||||||
local timervalue, formatid
|
local timervalue, formatid
|
||||||
timervalue, formatid, self.nextupdate = E:GetTimeInfo(self.expirationSaved, 4)
|
timervalue, formatid, self.nextupdate = E:GetTimeInfo(self.expirationSaved, 4)
|
||||||
if self.text:GetFont() then
|
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
|
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)
|
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: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)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user