From cce774b83703387ceaf7e17a18bcfbd5d011ccc4 Mon Sep 17 00:00:00 2001 From: Crum Date: Mon, 11 Jun 2018 22:55:08 -0500 Subject: [PATCH] cleanup SetFormattedText( -> SetText(format( --- ElvUI/Core/distributor.lua | 2 +- ElvUI/Core/pluginInstaller.lua | 2 +- ElvUI/Modules/NamePlates/Elements/Auras.lua | 2 +- ElvUI/Modules/NamePlates/Elements/CastBar.lua | 12 ++++++------ ElvUI/Modules/UnitFrames/Elements/Auras.lua | 6 +++--- 5 files changed, 12 insertions(+), 12 deletions(-) diff --git a/ElvUI/Core/distributor.lua b/ElvUI/Core/distributor.lua index f58f6f1..a10c643 100644 --- a/ElvUI/Core/distributor.lua +++ b/ElvUI/Core/distributor.lua @@ -120,7 +120,7 @@ function D:OnCommReceived(prefix, msg, dist, sender) OnAccept = function() self.statusBar:SetMinMaxValues(0, length) 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) self:SendCommMessage(REPLY_PREFIX, profile..":YES", dist, sender) end, diff --git a/ElvUI/Core/pluginInstaller.lua b/ElvUI/Core/pluginInstaller.lua index 96ae8c9..75af365 100644 --- a/ElvUI/Core/pluginInstaller.lua +++ b/ElvUI/Core/pluginInstaller.lua @@ -122,7 +122,7 @@ local function SetPage(PageNum, PrevPage) end 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 for i = 1, getn(f.side.Lines) do local b = f.side.Lines[i] diff --git a/ElvUI/Modules/NamePlates/Elements/Auras.lua b/ElvUI/Modules/NamePlates/Elements/Auras.lua index 4babc16..a9b2d42 100644 --- a/ElvUI/Modules/NamePlates/Elements/Auras.lua +++ b/ElvUI/Modules/NamePlates/Elements/Auras.lua @@ -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) diff --git a/ElvUI/Modules/NamePlates/Elements/CastBar.lua b/ElvUI/Modules/NamePlates/Elements/CastBar.lua index ebbae30..a64f019 100644 --- a/ElvUI/Modules/NamePlates/Elements/CastBar.lua +++ b/ElvUI/Modules/NamePlates/Elements/CastBar.lua @@ -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 diff --git a/ElvUI/Modules/UnitFrames/Elements/Auras.lua b/ElvUI/Modules/UnitFrames/Elements/Auras.lua index 15cea48..1eb8911 100644 --- a/ElvUI/Modules/UnitFrames/Elements/Auras.lua +++ b/ElvUI/Modules/UnitFrames/Elements/Auras.lua @@ -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