This commit is contained in:
Crum
2018-02-21 11:23:00 -06:00
parent 3717ffbca1
commit 612c53d6d5
11 changed files with 275 additions and 258 deletions
@@ -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)