AceGUI update

This commit is contained in:
Crum
2017-12-19 23:43:05 -06:00
parent 53b0da020b
commit 96387f6e4f
2 changed files with 6 additions and 6 deletions
@@ -452,7 +452,7 @@ function AceConfigDialog:SelectGroup(appName, a1,a2,a3,a4,a5,a6,a7,a8,a9,a10)
args[10] = a10 args[10] = a10
for n = 1, 10 do for n = 1, 10 do
local key = args[n] local key = args[n]
arg[n] = nil args[n] = nil
if not key then break end if not key then break end
@@ -7,7 +7,7 @@ local AceGUI = LibStub and LibStub("AceGUI-3.0", true)
if not AceGUI or (AceGUI:GetWidgetVersion(Type) or 0) >= Version then return end if not AceGUI or (AceGUI:GetWidgetVersion(Type) or 0) >= Version then return end
-- Lua APIs -- Lua APIs
local min, max, floor = math.min, math.max, math.floor local min, max, floor, format = math.min, math.max, math.floor, string.format
local tonumber, pairs = tonumber, pairs local tonumber, pairs = tonumber, pairs
-- WoW APIs -- WoW APIs
@@ -24,7 +24,7 @@ Support functions
local function UpdateText(self) local function UpdateText(self)
local value = self.value or 0 local value = self.value or 0
if self.ispercent then if self.ispercent then
self.editbox:SetText(("%s%%"):format(floor(value * 1000 + 0.5) / 10)) self.editbox:SetText(format("%s%%", floor(value * 1000 + 0.5) / 10))
else else
self.editbox:SetText(floor(value * 100 + 0.5) / 100) self.editbox:SetText(floor(value * 100 + 0.5) / 100)
end end
@@ -33,8 +33,8 @@ end
local function UpdateLabels(self) local function UpdateLabels(self)
local min, max = (self.min or 0), (self.max or 100) local min, max = (self.min or 0), (self.max or 100)
if self.ispercent then if self.ispercent then
self.lowtext:SetFormattedText("%s%%", (min * 100)) self.lowtext:SetText(format("%s%%", (min * 100)))
self.hightext:SetFormattedText("%s%%", (max * 100)) self.hightext:SetText(format("%s%%", (max * 100)))
else else
self.lowtext:SetText(min) self.lowtext:SetText(min)
self.hightext:SetText(max) self.hightext:SetText(max)