mirror of
https://github.com/Bluewhale1337/ElvUIModernized.git
synced 2026-07-27 08:24:44 +00:00
cleanup
This commit is contained in:
@@ -7,6 +7,7 @@ local AceCore = LibStub("AceCore-3.0")
|
||||
local min, max, floor = math.min, math.max, math.floor
|
||||
local pairs, ipairs, type = pairs, ipairs, type
|
||||
local tsort, tinsert, tgetn, tsetn = table.sort, table.insert, table.getn, table.setn
|
||||
local format = string.format
|
||||
|
||||
-- WoW APIs
|
||||
local PlaySound = PlaySound
|
||||
@@ -578,7 +579,7 @@ do
|
||||
local function AddListItem(self, value, text, itemType)
|
||||
if not itemType then itemType = "Dropdown-Item-Toggle" end
|
||||
local exists = AceGUI:GetWidgetVersion(itemType)
|
||||
if not exists then error(("The given item type, %q, does not exist within AceGUI-3.0"):format(tostring(itemType)), 2) end
|
||||
if not exists then error(format("The given item type, %q, does not exist within AceGUI-3.0", tostring(itemType)), 2) end
|
||||
|
||||
local item = AceGUI:Create(itemType)
|
||||
item:SetText(text)
|
||||
|
||||
@@ -7,7 +7,8 @@ local AceGUI = LibStub and LibStub("AceGUI-3.0", true)
|
||||
if not AceGUI or (AceGUI:GetWidgetVersion(Type) or 0) >= Version then return end
|
||||
|
||||
-- Lua APIs
|
||||
local min, max, floor, format = math.min, math.max, math.floor, string.format
|
||||
local min, max, floor = math.min, math.max, math.floor
|
||||
local format, gsub = string.format, string.gsub
|
||||
local tonumber, pairs = tonumber, pairs
|
||||
|
||||
-- WoW APIs
|
||||
@@ -101,7 +102,7 @@ local function EditBox_OnEnterPressed()
|
||||
local self = this.obj
|
||||
local value = this:GetText()
|
||||
if self.ispercent then
|
||||
value = value:gsub('%%', '')
|
||||
value = gsub(value, '%%', '')
|
||||
value = tonumber(value) / 100
|
||||
else
|
||||
value = tonumber(value)
|
||||
|
||||
Reference in New Issue
Block a user