mirror of
https://github.com/Bluewhale1337/ElvUIModernized.git
synced 2026-07-27 08:24:44 +00:00
AceGUI update
This commit is contained in:
+1
-1
@@ -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)
|
||||||
@@ -106,7 +106,7 @@ local function EditBox_OnEnterPressed()
|
|||||||
else
|
else
|
||||||
value = tonumber(value)
|
value = tonumber(value)
|
||||||
end
|
end
|
||||||
|
|
||||||
if value then
|
if value then
|
||||||
PlaySound("igMainMenuOptionCheckBoxOn")
|
PlaySound("igMainMenuOptionCheckBoxOn")
|
||||||
self.slider:SetValue(value)
|
self.slider:SetValue(value)
|
||||||
|
|||||||
Reference in New Issue
Block a user