diff --git a/ElvUI/Libraries/AceAddon-3.0/AceAddon-3.0.lua b/ElvUI/Libraries/AceAddon-3.0/AceAddon-3.0.lua index 6f4765b..4f6adfe 100644 --- a/ElvUI/Libraries/AceAddon-3.0/AceAddon-3.0.lua +++ b/ElvUI/Libraries/AceAddon-3.0/AceAddon-3.0.lua @@ -43,9 +43,9 @@ AceAddon.enablequeue = AceAddon.enablequeue or {} -- addons that are initialized AceAddon.embeds = AceAddon.embeds or setmetatable({}, {__index = function(tbl, key) tbl[key] = {} return tbl[key] end }) -- contains a list of libraries embedded in an addon -- Lua APIs -local tinsert, tconcat, tremove = table.insert, table.concat, table.remove -local fmt, tostring = string.format, tostring -local select, pairs, next, type, unpack = select, pairs, next, type, unpack +local tinsert, tconcat, tremove, getn = table.insert, table.concat, table.remove, table.getn +local fmt, gsub, tostring = string.format, string.gsub, tostring +local pairs, next, type, unpack = pairs, next, type, unpack local loadstring, assert, error = loadstring, assert, error local setmetatable, getmetatable, rawset, rawget = setmetatable, getmetatable, rawset, rawget @@ -64,14 +64,14 @@ end local function CreateDispatcher(argCount) local code = [[ - local xpcall, eh = ... + local xpcall, eh = xpcall, function(err) return geterrorhandler()(err) end local method, ARGS local function call() return method(ARGS) end local function dispatch(func, ...) method = func if not method then return end - ARGS = ... + ARGS = unpack(arg) return xpcall(call, eh) end @@ -80,7 +80,7 @@ local function CreateDispatcher(argCount) local ARGS = {} for i = 1, argCount do ARGS[i] = "arg"..i end - code = code:gsub("ARGS", tconcat(ARGS, ", ")) + code = gsub(code,"ARGS", tconcat(ARGS, ", ")) return assert(loadstring(code, "safecall Dispatcher["..argCount.."]"))(xpcall, errorhandler) end @@ -98,7 +98,7 @@ local function safecall(func, ...) -- this safecall is used for optional functions like OnInitialize OnEnable etc. When they are not -- present execution should continue without hinderance if type(func) == "function" then - return Dispatchers[select('#', ...)](func, ...) + return Dispatchers[getn(arg)](func, unpack(arg)) end end @@ -110,7 +110,7 @@ local function addontostring( self ) return self.name end -- Check if the addon is queued for initialization local function queuedForInitialization(addon) - for i = 1, #AceAddon.initializequeue do + for i = 1, getn(AceAddon.initializequeue) do if AceAddon.initializequeue[i] == addon then return true end @@ -138,16 +138,16 @@ function AceAddon:NewAddon(objectorname, ...) local i=1 if type(objectorname)=="table" then object=objectorname - name=... + name=arg[1] i=2 else name=objectorname end if type(name)~="string" then - error(("Usage: NewAddon([object,] name, [lib, lib, lib, ...]): 'name' - string expected got '%s'."):format(type(name)), 2) + error(fmt("Usage: NewAddon([object,] name, [lib, lib, lib, ...]): 'name' - string expected got '%s'.", type(name)), 2) end if self.addons[name] then - error(("Usage: NewAddon([object,] name, [lib, lib, lib, ...]): 'name' - Addon '%s' already exists."):format(name), 2) + error(fmt("Usage: NewAddon([object,] name, [lib, lib, lib, ...]): 'name' - Addon '%s' already exists.", name), 2) end object = object or {} @@ -166,7 +166,13 @@ function AceAddon:NewAddon(objectorname, ...) object.orderedModules = {} object.defaultModuleLibraries = {} Embed( object ) -- embed NewModule, GetModule methods - self:EmbedLibraries(object, select(i,...)) + + if i == 1 then + self:EmbedLibraries(object, unpack(arg)) + else + table.remove(arg, 1) + self:EmbedLibraries(object, unpack(arg)) + end -- add to queue of addons to be initialized upon ADDON_LOADED tinsert(self.initializequeue, object) @@ -183,7 +189,7 @@ end -- MyAddon = LibStub("AceAddon-3.0"):GetAddon("MyAddon") function AceAddon:GetAddon(name, silent) if not silent and not self.addons[name] then - error(("Usage: GetAddon(name): 'name' - Cannot find an AceAddon '%s'."):format(tostring(name)), 2) + error(fmt("Usage: GetAddon(name): 'name' - Cannot find an AceAddon '%s'.", tostring(name)), 2) end return self.addons[name] end @@ -197,8 +203,8 @@ end -- @param addon addon object to embed the libs in -- @param lib List of libraries to embed into the addon function AceAddon:EmbedLibraries(addon, ...) - for i=1,select("#", ... ) do - local libname = select(i, ...) + for i=1,getn(arg) do + local libname = arg[i] self:EmbedLibrary(addon, libname, false, 4) end end @@ -217,13 +223,13 @@ end function AceAddon:EmbedLibrary(addon, libname, silent, offset) local lib = LibStub:GetLibrary(libname, true) if not lib and not silent then - error(("Usage: EmbedLibrary(addon, libname, silent, offset): 'libname' - Cannot find a library instance of %q."):format(tostring(libname)), offset or 2) + error(fmt("Usage: EmbedLibrary(addon, libname, silent, offset): 'libname' - Cannot find a library instance of %q.", tostring(libname)), offset or 2) elseif lib and type(lib.Embed) == "function" then lib:Embed(addon) tinsert(self.embeds[addon], libname) return true elseif lib then - error(("Usage: EmbedLibrary(addon, libname, silent, offset): 'libname' - Library '%s' is not Embed capable"):format(libname), offset or 2) + error(fmt("Usage: EmbedLibrary(addon, libname, silent, offset): 'libname' - Library '%s' is not Embed capable", libname), offset or 2) end end @@ -240,7 +246,7 @@ end -- MyModule = MyAddon:GetModule("MyModule") function GetModule(self, name, silent) if not self.modules[name] and not silent then - error(("Usage: GetModule(name, silent): 'name' - Cannot find module '%s'."):format(tostring(name)), 2) + error(fmt("Usage: GetModule(name, silent): 'name' - Cannot find module '%s'.", tostring(name)), 2) end return self.modules[name] end @@ -264,10 +270,10 @@ local function IsModuleTrue(self) return true end -- local prototype = { OnEnable = function(self) print("OnEnable called!") end } -- MyModule = MyAddon:NewModule("MyModule", prototype, "AceEvent-3.0", "AceHook-3.0") function NewModule(self, name, prototype, ...) - if type(name) ~= "string" then error(("Usage: NewModule(name, [prototype, [lib, lib, lib, ...]): 'name' - string expected got '%s'."):format(type(name)), 2) end - if type(prototype) ~= "string" and type(prototype) ~= "table" and type(prototype) ~= "nil" then error(("Usage: NewModule(name, [prototype, [lib, lib, lib, ...]): 'prototype' - table (prototype), string (lib) or nil expected got '%s'."):format(type(prototype)), 2) end + if type(name) ~= "string" then error(fmt("Usage: NewModule(name, [prototype, [lib, lib, lib, ...]): 'name' - string expected got '%s'.", type(name)), 2) end + if type(prototype) ~= "string" and type(prototype) ~= "table" and type(prototype) ~= "nil" then error(fmt("Usage: NewModule(name, [prototype, [lib, lib, lib, ...]): 'prototype' - table (prototype), string (lib) or nil expected got '%s'.", type(prototype)), 2) end - if self.modules[name] then error(("Usage: NewModule(name, [prototype, [lib, lib, lib, ...]): 'name' - Module '%s' already exists."):format(name), 2) end + if self.modules[name] then error(fmt("Usage: NewModule(name, [prototype, [lib, lib, lib, ...]): 'name' - Module '%s' already exists.", name), 2) end -- modules are basically addons. We treat them as such. They will be added to the initializequeue properly as well. -- NewModule can only be called after the parent addon is present thus the modules will be initialized after their parent is. @@ -278,9 +284,9 @@ function NewModule(self, name, prototype, ...) module.moduleName = name if type(prototype) == "string" then - AceAddon:EmbedLibraries(module, prototype, ...) + AceAddon:EmbedLibraries(module, prototype, unpack(arg)) else - AceAddon:EmbedLibraries(module, ...) + AceAddon:EmbedLibraries(module, unpack(arg)) end AceAddon:EmbedLibraries(module, unpack(self.defaultModuleLibraries)) @@ -399,7 +405,7 @@ function SetDefaultModuleLibraries(self, ...) if next(self.modules) then error("Usage: SetDefaultModuleLibraries(...): cannot change the module defaults after a module has been registered.", 2) end - self.defaultModuleLibraries = {...} + self.defaultModuleLibraries = arg end --- Set the default state in which new modules are being created. @@ -442,7 +448,7 @@ function SetDefaultModulePrototype(self, prototype) error("Usage: SetDefaultModulePrototype(prototype): cannot change the module defaults after a module has been registered.", 2) end if type(prototype) ~= "table" then - error(("Usage: SetDefaultModulePrototype(prototype): 'prototype' - table expected got '%s'."):format(type(prototype)), 2) + error(fmt("Usage: SetDefaultModulePrototype(prototype): 'prototype' - table expected got '%s'.", type(prototype)), 2) end self.defaultModulePrototype = prototype end @@ -529,7 +535,7 @@ function AceAddon:InitializeAddon(addon) safecall(addon.OnInitialize, addon) local embeds = self.embeds[addon] - for i = 1, #embeds do + for i = 1, getn(embeds) do local lib = LibStub:GetLibrary(embeds[i], true) if lib then safecall(lib.OnEmbedInitialize, lib, addon) end end @@ -560,14 +566,14 @@ function AceAddon:EnableAddon(addon) -- make sure we're still enabled before continueing if self.statuses[addon.name] then local embeds = self.embeds[addon] - for i = 1, #embeds do + for i = 1, getn(embeds) do local lib = LibStub:GetLibrary(embeds[i], true) if lib then safecall(lib.OnEmbedEnable, lib, addon) end end -- enable possible modules. local modules = addon.orderedModules - for i = 1, #modules do + for i = 1, getn(modules) do self:EnableAddon(modules[i]) end end @@ -595,13 +601,13 @@ function AceAddon:DisableAddon(addon) -- make sure we're still disabling... if not self.statuses[addon.name] then local embeds = self.embeds[addon] - for i = 1, #embeds do + for i = 1, getn(embeds) do local lib = LibStub:GetLibrary(embeds[i], true) if lib then safecall(lib.OnEmbedDisable, lib, addon) end end -- disable possible modules. local modules = addon.orderedModules - for i = 1, #modules do + for i = 1, getn(modules) do self:DisableAddon(modules[i]) end end @@ -633,11 +639,12 @@ function AceAddon:IterateEmbedsOnAddon(addon) return pairs(self.embeds[addon]) e function AceAddon:IterateModulesOfAddon(addon) return pairs(addon.modules) end -- Event Handling -local function onEvent(this, event, arg1) +local IsLoggedIn +local function onEvent() -- 2011-08-17 nevcairiel - ignore the load event of !DebugTools, so a potential startup error isn't swallowed up if (event == "ADDON_LOADED" and arg1 ~= "!DebugTools") or event == "PLAYER_LOGIN" then -- if a addon loads another addon, recursion could happen here, so we need to validate the table on every iteration - while(#AceAddon.initializequeue > 0) do + while(getn(AceAddon.initializequeue) > 0) do local addon = tremove(AceAddon.initializequeue, 1) -- this might be an issue with recursion - TODO: validate if event == "ADDON_LOADED" then addon.baseName = arg1 end @@ -645,8 +652,12 @@ local function onEvent(this, event, arg1) tinsert(AceAddon.enablequeue, addon) end - if IsLoggedIn() then - while(#AceAddon.enablequeue > 0) do + if event == "PLAYER_LOGIN" then + IsLoggedIn = true + end + + if IsLoggedIn then + while(getn(AceAddon.enablequeue) > 0) do local addon = tremove(AceAddon.enablequeue, 1) AceAddon:EnableAddon(addon) end diff --git a/ElvUI/Libraries/AceComm-3.0/AceComm-3.0.lua b/ElvUI/Libraries/AceComm-3.0/AceComm-3.0.lua index 50dc918..5a45841 100644 --- a/ElvUI/Libraries/AceComm-3.0/AceComm-3.0.lua +++ b/ElvUI/Libraries/AceComm-3.0/AceComm-3.0.lua @@ -26,9 +26,9 @@ local AceComm,oldminor = LibStub:NewLibrary(MAJOR, MINOR) if not AceComm then return end -- Lua APIs -local type, next, pairs, tostring = type, next, pairs, tostring -local strsub, strfind = string.sub, string.find -local tinsert, tconcat = table.insert, table.concat +local type, next, pairs, tostring, unpack = type, next, pairs, tostring, unpack +local strsub, strfind, strlen = string.sub, string.find, string.len +local tinsert, tconcat, tremove = table.insert, table.concat, table.remove local error, assert = error, assert -- Global vars/functions that we don't upvalue since they might get hooked, or upgraded @@ -91,8 +91,8 @@ function AceComm:SendCommMessage(prefix, text, distribution, target, prio, callb end - local textlen = #text - local maxtextlen = 254 - #prefix -- 254 is the max length of prefix + text that can be sent in one message + local textlen = strlen(text) + local maxtextlen = 254 - strlen(prefix) -- 254 is the max length of prefix + text that can be sent in one message local queueName = prefix..distribution..(target or "") local ctlCallback = nil @@ -139,8 +139,8 @@ do local t = next(compost) if t then compost[t]=nil - for i=#t,3,-1 do -- faster than pairs loop. don't even nil out 1/2 since they'll be overwritten - t[i]=nil + for i=getn(t),3,-1 do -- faster than pairs loop. don't even nil out 1/2 since they'll be overwritten + tremove(t, i) end return t end @@ -253,9 +253,9 @@ function AceComm.callbacks:OnUnused(target, prefix) AceComm.multipart_reassemblers[prefix..MSG_MULTI_LAST] = nil end -local function OnEvent(this, event, ...) +local function OnEvent() if event == "CHAT_MSG_ADDON" then - local prefix,message,distribution,sender = ... + local prefix,message,distribution,sender = unpack(arg) local reassemblername = AceComm.multipart_reassemblers[prefix] if reassemblername then -- multipart: reassemble diff --git a/ElvUI/Libraries/AceComm-3.0/ChatThrottleLib.lua b/ElvUI/Libraries/AceComm-3.0/ChatThrottleLib.lua index 148cc58..244b8d2 100644 --- a/ElvUI/Libraries/AceComm-3.0/ChatThrottleLib.lua +++ b/ElvUI/Libraries/AceComm-3.0/ChatThrottleLib.lua @@ -64,6 +64,7 @@ ChatThrottleLib.MIN_FPS = 20 -- Reduce output CPS to half (and don't burst) i local setmetatable = setmetatable +local table_insert = table.insert local table_remove = table.remove local tostring = tostring local GetTime = GetTime @@ -121,7 +122,7 @@ ChatThrottleLib.PipeBin = nil -- pre-v19, drastically different local PipeBin = setmetatable({}, {__mode="k"}) local function DelPipe(pipe) - for i = #pipe, 1, -1 do + for i = getn(pipe), 1, -1 do pipe[i] = nil end pipe.prev = nil @@ -209,12 +210,12 @@ function ChatThrottleLib:Init() -- Use secure hooks as of v16. Old regular hook support yanked out in v21. self.securelyHooked = true --SendChatMessage - hooksecurefunc("SendChatMessage", function(...) - return ChatThrottleLib.Hook_SendChatMessage(...) + hooksecurefunc("SendChatMessage", function(text, chattype, language, destination) + return ChatThrottleLib.Hook_SendChatMessage(text, chattype, language, destination) end) --SendAddonMessage - hooksecurefunc("SendAddonMessage", function(...) - return ChatThrottleLib.Hook_SendAddonMessage(...) + hooksecurefunc("SendAddonMessage", function(prefix, text, chattype, destination) + return ChatThrottleLib.Hook_SendAddonMessage(prefix, text, chattype, destination) end) end self.nBypass = 0 @@ -240,8 +241,8 @@ function ChatThrottleLib.Hook_SendAddonMessage(prefix, text, chattype, destinati return end local self = ChatThrottleLib - local size = tostring(text or ""):len() + tostring(prefix or ""):len(); - size = size + tostring(destination or ""):len() + self.MSG_OVERHEAD + local size = strlen(tostring(text or "")) + strlen(tostring(prefix or "")); + size = size + strlen(tostring(destination or "")) + self.MSG_OVERHEAD self.avail = self.avail - size self.nBypass = self.nBypass + size -- just a statistic end @@ -307,7 +308,7 @@ function ChatThrottleLib:Despool(Prio) end -function ChatThrottleLib.OnEvent(this,event) +function ChatThrottleLib.OnEvent() -- v11: We know that the rate limiter is touchy after login. Assume that it's touchy after zoning, too. local self = ChatThrottleLib if event == "PLAYER_ENTERING_WORLD" then @@ -317,10 +318,10 @@ function ChatThrottleLib.OnEvent(this,event) end -function ChatThrottleLib.OnUpdate(this,delay) +function ChatThrottleLib.OnUpdate() local self = ChatThrottleLib - self.OnUpdateDelay = self.OnUpdateDelay + delay + self.OnUpdateDelay = self.OnUpdateDelay + arg1 if self.OnUpdateDelay < 0.08 then return end @@ -386,7 +387,7 @@ function ChatThrottleLib:Enqueue(prioname, pipename, msg) Prio.Ring:Add(pipe) end - pipe[#pipe + 1] = msg + table_insert(pipe, msg) self.bQueueing = true end @@ -401,7 +402,7 @@ function ChatThrottleLib:SendChatMessage(prio, prefix, text, chattype, languag error('ChatThrottleLib:ChatMessage(): callbackFn: expected function, got '..type(callbackFn), 2) end - local nSize = text:len() + local nSize = strlen(text) if nSize>255 then error("ChatThrottleLib:SendChatMessage(): message length cannot exceed 255 bytes", 2) @@ -446,7 +447,7 @@ function ChatThrottleLib:SendAddonMessage(prio, prefix, text, chattype, target, error('ChatThrottleLib:SendAddonMessage(): callbackFn: expected function, got '..type(callbackFn), 2) end - local nSize = prefix:len() + 1 + text:len(); + local nSize = strlen(prefix) + 1 + strlen(text); if nSize>255 then error("ChatThrottleLib:SendAddonMessage(): prefix + message length cannot exceed 254 bytes", 2) diff --git a/ElvUI/Libraries/AceConsole-3.0/AceConsole-3.0.lua b/ElvUI/Libraries/AceConsole-3.0/AceConsole-3.0.lua index 0ab4d9a..2fa54dc 100644 --- a/ElvUI/Libraries/AceConsole-3.0/AceConsole-3.0.lua +++ b/ElvUI/Libraries/AceConsole-3.0/AceConsole-3.0.lua @@ -21,9 +21,9 @@ AceConsole.commands = AceConsole.commands or {} -- table containing commands reg AceConsole.weakcommands = AceConsole.weakcommands or {} -- table containing self, command => func references for weak commands that don't persist through enable/disable -- Lua APIs -local tconcat, tostring, select = table.concat, tostring, select +local tconcat, getn, tostring = table.concat, table.getn, tostring local type, pairs, error = type, pairs, error -local format, strfind, strsub = string.format, string.find, string.sub +local format, strfind, strsub, upper, lower = string.format, string.find, string.sub, string.upper, string.lower local max = math.max -- WoW APIs @@ -40,9 +40,9 @@ local function Print(self,frame,...) n=n+1 tmp[n] = "|cff33ff99"..tostring( self ).."|r:" end - for i=1, select("#", ...) do + for i=1, getn(arg) do n=n+1 - tmp[n] = tostring(select(i, ...)) + tmp[n] = tostring(arg[i]) end frame:AddMessage( tconcat(tmp," ",1,n) ) end @@ -52,11 +52,11 @@ end -- @param chatframe Custom ChatFrame to print to (or any frame with an .AddMessage function) -- @param ... List of any values to be printed function AceConsole:Print(...) - local frame = ... + local frame = arg[1] if type(frame) == "table" and frame.AddMessage then -- Is first argument something with an .AddMessage member? - return Print(self, frame, select(2,...)) + return Print(self, unpack(arg)) else - return Print(self, DEFAULT_CHAT_FRAME, ...) + return Print(self, DEFAULT_CHAT_FRAME, unpack(arg)) end end @@ -67,11 +67,12 @@ end -- @param format Format string - same syntax as standard Lua format() -- @param ... Arguments to the format string function AceConsole:Printf(...) - local frame = ... + local frame = arg[1] if type(frame) == "table" and frame.AddMessage then -- Is first argument something with an .AddMessage member? - return Print(self, frame, format(select(2,...))) + tremove(arg, 1) + return Print(self, frame, format(unpack(arg))) else - return Print(self, DEFAULT_CHAT_FRAME, format(...)) + return Print(self, DEFAULT_CHAT_FRAME, format(unpack(arg))) end end @@ -87,7 +88,7 @@ function AceConsole:RegisterChatCommand( command, func, persist ) if persist==nil then persist=true end -- I'd rather have my addon's "/addon enable" around if the author screws up. Having some extra slash regged when it shouldnt be isn't as destructive. True is a better default. /Mikk - local name = "ACECONSOLE_"..command:upper() + local name = "ACECONSOLE_"..upper(command) if type( func ) == "string" then SlashCmdList[name] = function(input, editBox) @@ -96,7 +97,7 @@ function AceConsole:RegisterChatCommand( command, func, persist ) else SlashCmdList[name] = func end - _G["SLASH_"..name.."1"] = "/"..command:lower() + _G["SLASH_"..name.."1"] = "/"..lower(command) AceConsole.commands[command] = name -- non-persisting commands are registered for enabling disabling if not persist then @@ -113,7 +114,7 @@ function AceConsole:UnregisterChatCommand( command ) if name then SlashCmdList[name] = nil _G["SLASH_" .. name .. "1"] = nil - hash_SlashCmdList["/" .. command:upper()] = nil + hash_SlashCmdList["/" .. upper(command)] = nil AceConsole.commands[command] = nil end end @@ -125,11 +126,11 @@ function AceConsole:IterateChatCommands() return pairs(AceConsole.commands) end local function nils(n, ...) if n>1 then - return nil, nils(n-1, ...) + return nil, nils(n-1, unpack(arg)) elseif n==1 then - return nil, ... + return nil, unpack(arg) else - return ... + return unpack(arg) end end diff --git a/ElvUI/Libraries/AceDB-3.0/AceDB-3.0.lua b/ElvUI/Libraries/AceDB-3.0/AceDB-3.0.lua index 9518a87..2422372 100644 --- a/ElvUI/Libraries/AceDB-3.0/AceDB-3.0.lua +++ b/ElvUI/Libraries/AceDB-3.0/AceDB-3.0.lua @@ -49,6 +49,7 @@ if not AceDB then return end -- No upgrade needed -- Lua APIs local type, pairs, next, error = type, pairs, next, error local setmetatable, getmetatable, rawset, rawget = setmetatable, getmetatable, rawset, rawget +local format = string.format -- WoW APIs local _G = _G @@ -74,6 +75,7 @@ local function copyTable(src, dest) if type(dest) ~= "table" then dest = {} end if type(src) == "table" then for k,v in pairs(src) do + local v = v if type(v) == "table" then -- try to index the key first so that the metatable creates the defaults, if set, and use that table v = copyTable(v, dest[k]) @@ -93,6 +95,7 @@ local function copyDefaults(dest, src) -- this happens if some value in the SV overwrites our default value with a non-table --if type(dest) ~= "table" then return end for k, v in pairs(src) do + local v = v if k == "*" or k == "**" then if type(v) == "table" then -- This is a metatable used for table defaults @@ -140,10 +143,12 @@ local function removeDefaults(db, defaults, blocker) setmetatable(db, nil) -- loop through the defaults and remove their content for k,v in pairs(defaults) do + local v = v if k == "*" or k == "**" then if type(v) == "table" then -- Loop through all the actual k,v pairs and remove for key, value in pairs(db) do + local value = value if type(value) == "table" then -- if the key was not explicitly specified in the defaults table, just strip everything from * and ** tables if defaults[key] == nil and (not blocker or blocker[key] == nil) then @@ -242,7 +247,7 @@ local function validateDefaults(defaults, keyTbl, offset) offset = offset or 0 for k in pairs(defaults) do if not keyTbl[k] or k == "profiles" then - error(("Usage: AceDBObject:RegisterDefaults(defaults): '%s' is not a valid datatype."):format(k), 3 + offset) + error(format("Usage: AceDBObject:RegisterDefaults(defaults): '%s' is not a valid datatype.", k), 3 + offset) end end end @@ -260,9 +265,10 @@ local charKey = UnitName("player") .. " - " .. realmKey local _, classKey = UnitClass("player") local _, raceKey = UnitRace("player") local factionKey = UnitFactionGroup("player") +factionKey = factionKey or "Others" local factionrealmKey = factionKey .. " - " .. realmKey -local factionrealmregionKey = factionrealmKey .. " - " .. string.sub(GetCVar("realmList"), 1, 2):upper() -local localeKey = GetLocale():lower() +local factionrealmregionKey = factionrealmKey .. " - " .. string.upper(string.sub(GetCVar("realmList"), 1, 2)) +local localeKey = string.lower(GetLocale()) -- Actual database initialization function local function initdb(sv, defaults, defaultProfile, olddb, parent) @@ -353,7 +359,7 @@ end -- handle PLAYER_LOGOUT -- strip all defaults from all databases -- and cleans up empty sections -local function logoutHandler(frame, event) +local function logoutHandler() if event == "PLAYER_LOGOUT" then for db in pairs(AceDB.db_registry) do db.callbacks:Fire("OnDatabaseShutdown", db) diff --git a/ElvUI/Libraries/AceEvent-3.0/AceEvent-3.0.lua b/ElvUI/Libraries/AceEvent-3.0/AceEvent-3.0.lua index 802fb97..c126cf0 100644 --- a/ElvUI/Libraries/AceEvent-3.0/AceEvent-3.0.lua +++ b/ElvUI/Libraries/AceEvent-3.0/AceEvent-3.0.lua @@ -116,8 +116,8 @@ end -- Script to fire blizzard events into the event listeners local events = AceEvent.events -AceEvent.frame:SetScript("OnEvent", function(this, event, ...) - events:Fire(event, ...) +AceEvent.frame:SetScript("OnEvent", function() + events:Fire(event) end) --- Finally: upgrade our old embeds diff --git a/ElvUI/Libraries/AceHook-3.0/AceHook-3.0.lua b/ElvUI/Libraries/AceHook-3.0/AceHook-3.0.lua index 6af4731..d11a9dc 100644 --- a/ElvUI/Libraries/AceHook-3.0/AceHook-3.0.lua +++ b/ElvUI/Libraries/AceHook-3.0/AceHook-3.0.lua @@ -31,11 +31,12 @@ local scripts = AceHook.scripts local onceSecure = AceHook.onceSecure -- Lua APIs -local pairs, next, type = pairs, next, type +local pairs, next, type, unpack = pairs, next, type, unpack local format = string.format local assert, error = assert, error -- WoW APIs +local HookScript = HookScript local issecurevariable, hooksecurefunc = issecurevariable, hooksecurefunc local _G = _G @@ -87,12 +88,12 @@ function createHook(self, handler, orig, secure, failsafe) uid = function(...) if actives[uid] then if method then - self[handler](self, ...) + self[handler](self, unpack(arg)) else - handler(...) + handler(unpack(arg)) end end - return orig(...) + return orig(unpack(arg)) end -- /failsafe hook else @@ -100,12 +101,12 @@ function createHook(self, handler, orig, secure, failsafe) uid = function(...) if actives[uid] then if method then - return self[handler](self, ...) + return self[handler](self, unpack(arg)) else - return handler(...) + return handler(unpack(arg)) end elseif not secure then -- backup on non secure - return orig(...) + return orig(unpack(arg)) end end -- /hook @@ -226,7 +227,7 @@ function hook(self, obj, method, handler, script, secure, raw, forceSecure, usag if not secure then obj:SetScript(method, uid) else - obj:HookScript2(method, uid) + HookScript(obj, method, uid) end else if not secure then diff --git a/ElvUI/Libraries/AceSerializer-3.0/AceSerializer-3.0.lua b/ElvUI/Libraries/AceSerializer-3.0/AceSerializer-3.0.lua index 10c0f03..97e6c6a 100644 --- a/ElvUI/Libraries/AceSerializer-3.0/AceSerializer-3.0.lua +++ b/ElvUI/Libraries/AceSerializer-3.0/AceSerializer-3.0.lua @@ -20,8 +20,8 @@ if not AceSerializer then return end local strbyte, strchar, gsub, gmatch, format = string.byte, string.char, string.gsub, string.gmatch, string.format local assert, error, pcall = assert, error, pcall local type, tostring, tonumber = type, tostring, tonumber -local pairs, select, frexp = pairs, select, math.frexp -local tconcat = table.concat +local pairs, frexp = pairs, math.frexp +local tconcat, getn = table.concat, table.getn -- quick copies of string representations of wonky numbers local serNaN = tostring(0/0) @@ -116,8 +116,8 @@ local serializeTbl = { "^1" } -- "^1" = Hi, I'm data serialized by AceSerializer function AceSerializer:Serialize(...) local nres = 1 - for i=1,select("#", ...) do - local v = select(i, ...) + for i=1,getn(arg) do + local v = arg[i] nres = SerializeValue(v, serializeTbl, nres) end diff --git a/ElvUI/Libraries/AceTimer-3.0/AceTimer-3.0.lua b/ElvUI/Libraries/AceTimer-3.0/AceTimer-3.0.lua index 11c86fd..e8173d8 100644 --- a/ElvUI/Libraries/AceTimer-3.0/AceTimer-3.0.lua +++ b/ElvUI/Libraries/AceTimer-3.0/AceTimer-3.0.lua @@ -49,9 +49,10 @@ AceTimer.frame = AceTimer.frame or CreateFrame("Frame", "AceTimer30Frame") -- Lua APIs local assert, error, loadstring = assert, error, loadstring local setmetatable, rawset, rawget = setmetatable, rawset, rawget -local select, pairs, type, next, tostring = select, pairs, type, next, tostring -local floor, max, min = math.floor, math.max, math.min -local tconcat = table.concat +local pairs, type, next, tostring, unpack = pairs, type, next, tostring, unpack +local gsub = string.gsub +local floor, max, min, fmod = math.floor, math.max, math.min, math.fmod +local tconcat, getn = table.concat, table.getn -- WoW APIs local GetTime = GetTime @@ -93,14 +94,14 @@ end local function CreateDispatcher(argCount) local code = [[ - local xpcall, eh = ... -- our arguments are received as unnamed values in "..." since we don't have a proper function declaration + local xpcall, eh = xpcall, function(err) return geterrorhandler()(err) end -- our arguments are received as unnamed values in "..." since we don't have a proper function declaration local method, ARGS local function call() return method(ARGS) end local function dispatch(func, ...) method = func if not method then return end - ARGS = ... + ARGS = unpack(arg) return xpcall(call, eh) end @@ -109,7 +110,7 @@ local function CreateDispatcher(argCount) local ARGS = {} for i = 1, argCount do ARGS[i] = "arg"..i end - code = code:gsub("ARGS", tconcat(ARGS, ", ")) + code = gsub(code, "ARGS", tconcat(ARGS, ", ")) return assert(loadstring(code, "safecall Dispatcher["..argCount.."]"))(xpcall, errorhandler) end @@ -125,7 +126,7 @@ Dispatchers[0] = function(func) end local function safecall(func, ...) - return Dispatchers[select('#', ...)](func, ...) + return Dispatchers[getn(arg)](func, unpack(arg)) end local lastint = floor(GetTime() * HZ) @@ -147,7 +148,7 @@ local function OnUpdate() -- Pass through each bucket at most once -- Happens on e.g. instance loads, but COULD happen on high local load situations also for curint = (max(lastint, nowint - BUCKETS) + 1), nowint do -- loop until we catch up with "now", usually only 1 iteration - local curbucket = (curint % BUCKETS)+1 + local curbucket = (fmod(curint, BUCKETS))+1 -- Yank the list of timers out of the bucket and empty it. This allows reinsertion in the currently-processed bucket from callbacks. local nexttimer = hash[curbucket] hash[curbucket] = false -- false rather than nil to prevent the array from becoming a hash @@ -184,7 +185,7 @@ local function OnUpdate() timer.when = newtime -- add next timer execution to the correct bucket - local bucket = (floor(newtime * HZ) % BUCKETS) + 1 + local bucket = (fmod(floor(newtime * HZ), BUCKETS)) + 1 timer.next = hash[bucket] hash[bucket] = timer end @@ -208,7 +209,7 @@ end -- repeating(boolean) - repeating timer, or oneshot -- -- returns the handle of the timer for later processing (canceling etc) -local function Reg(self, callback, delay, arg, repeating) +local function Reg(self, callback, delay, argument, repeating) if type(callback) ~= "string" and type(callback) ~= "function" then local error_origin = repeating and "ScheduleRepeatingTimer" or "ScheduleTimer" error(MAJOR..": " .. error_origin .. "(callback, delay, arg): 'callback' - function or method name expected.", 3) @@ -237,10 +238,10 @@ local function Reg(self, callback, delay, arg, repeating) timer.object = self timer.callback = callback timer.delay = (repeating and delay) - timer.arg = arg + timer.arg = argument timer.when = now + delay - local bucket = (floor((now+delay)*HZ) % BUCKETS) + 1 + local bucket = (fmod(floor((now+delay)*HZ), BUCKETS)) + 1 timer.next = hash[bucket] hash[bucket] = timer @@ -273,8 +274,8 @@ end -- function MyAddon:TimerFeedback() -- print("5 seconds passed") -- end -function AceTimer:ScheduleTimer(callback, delay, arg) - return Reg(self, callback, delay, arg) +function AceTimer:ScheduleTimer(callback, delay, argument) + return Reg(self, callback, delay, argument) end --- Schedule a repeating timer. @@ -292,14 +293,14 @@ end -- -- function MyAddon:TimerFeedback() -- self.timerCount = self.timerCount + 1 --- print(("%d seconds passed"):format(5 * self.timerCount)) +-- print(format("%d seconds passed", 5 * self.timerCount)) -- -- run 30 seconds in total -- if self.timerCount == 6 then -- self:CancelTimer(self.testTimer) -- end -- end -function AceTimer:ScheduleRepeatingTimer(callback, delay, arg) - return Reg(self, callback, delay, arg, true) +function AceTimer:ScheduleRepeatingTimer(callback, delay, argument) + return Reg(self, callback, delay, argument, true) end --- Cancels a timer with the given handle, registered by the same addon object as used for `:ScheduleTimer` @@ -384,7 +385,7 @@ end local lastCleaned = nil -local function OnEvent(this, event) +local function OnEvent() if event~="PLAYER_REGEN_ENABLED" then return end diff --git a/ElvUI/Libraries/CallbackHandler-1.0/CallbackHandler-1.0.lua b/ElvUI/Libraries/CallbackHandler-1.0/CallbackHandler-1.0.lua index 2a64013..f99948f 100644 --- a/ElvUI/Libraries/CallbackHandler-1.0/CallbackHandler-1.0.lua +++ b/ElvUI/Libraries/CallbackHandler-1.0/CallbackHandler-1.0.lua @@ -1,4 +1,4 @@ ---[[ $Id: CallbackHandler-1.0.lua 18 2014-10-16 02:52:20Z mikk $ ]] +--[[ $Id: CallbackHandler-1.0.lua 1131 2015-06-04 07:29:24Z nevcairiel $ ]] local MAJOR, MINOR = "CallbackHandler-1.0", 6 local CallbackHandler = LibStub:NewLibrary(MAJOR, MINOR) @@ -7,10 +7,10 @@ if not CallbackHandler then return end -- No upgrade needed local meta = {__index = function(tbl, key) tbl[key] = {} return tbl[key] end} -- Lua APIs -local tconcat = table.concat +local tconcat, getn = table.concat, table.getn local assert, error, loadstring = assert, error, loadstring local setmetatable, rawset, rawget = setmetatable, rawset, rawget -local next, select, pairs, type, tostring = next, select, pairs, type, tostring +local next, pairs, type, tostring = next, pairs, type, tostring -- Global vars/functions that we don't upvalue since they might get hooked, or upgraded -- List them here for Mikk's FindGlobals script @@ -24,7 +24,7 @@ end local function CreateDispatcher(argCount) local code = [[ - local next, xpcall, eh = ... + local next, xpcall, eh = next, xpcall, function(err) return geterrorhandler()(err) end local method, ARGS local function call() method(ARGS) end @@ -34,7 +34,7 @@ local function CreateDispatcher(argCount) index, method = next(handlers) if not method then return end local OLD_ARGS = ARGS - ARGS = ... + ARGS = unpack(arg) repeat xpcall(call, eh) index, method = next(handlers, index) @@ -47,7 +47,7 @@ local function CreateDispatcher(argCount) local ARGS, OLD_ARGS = {}, {} for i = 1, argCount do ARGS[i], OLD_ARGS[i] = "arg"..i, "old_arg"..i end - code = code:gsub("OLD_ARGS", tconcat(OLD_ARGS, ", ")):gsub("ARGS", tconcat(ARGS, ", ")) + code = gsub(gsub(code, "OLD_ARGS", tconcat(OLD_ARGS, ", ")), "ARGS", tconcat(ARGS, ", ")) return assert(loadstring(code, "safecall Dispatcher["..argCount.."]"))(next, xpcall, errorhandler) end @@ -87,7 +87,7 @@ function CallbackHandler:New(target, RegisterName, UnregisterName, UnregisterAll local oldrecurse = registry.recurse registry.recurse = oldrecurse + 1 - Dispatchers[select('#', ...) + 1](events[eventname], eventname, ...) + Dispatchers[getn(arg) + 1](events[eventname], eventname, unpack(arg)) registry.recurse = oldrecurse @@ -138,11 +138,11 @@ function CallbackHandler:New(target, RegisterName, UnregisterName, UnregisterAll error("Usage: "..RegisterName.."(\"eventname\", \"methodname\"): 'methodname' - method '"..tostring(method).."' not found on self.", 2) end - if select("#",...)>=1 then -- this is not the same as testing for arg==nil! - local arg=select(1,...) - regfunc = function(...) self[method](self,arg,...) end + if getn(arg)>=1 then -- this is not the same as testing for arg==nil! + local a1=arg[1] + regfunc = function(...) self[method](self,a1,unpack(arg)) end else - regfunc = function(...) self[method](self,...) end + regfunc = function(...) self[method](self,unpack(arg)) end end else -- function ref with self=object or self="addonId" or self=thread @@ -150,9 +150,9 @@ function CallbackHandler:New(target, RegisterName, UnregisterName, UnregisterAll error("Usage: "..RegisterName.."(self or \"addonId\", eventname, method): 'self or addonId': table or string or thread expected.", 2) end - if select("#",...)>=1 then -- this is not the same as testing for arg==nil! - local arg=select(1,...) - regfunc = function(...) method(arg,...) end + if getn(arg)>=1 then -- this is not the same as testing for arg==nil! + local a1=arg[1] + regfunc = function(...) method(arg,unpack(arg)) end else regfunc = method end @@ -198,16 +198,16 @@ function CallbackHandler:New(target, RegisterName, UnregisterName, UnregisterAll -- OPTIONAL: Unregister all callbacks for given selfs/addonIds if UnregisterAllName then target[UnregisterAllName] = function(...) - if select("#",...)<1 then + if getn(arg)<1 then error("Usage: "..UnregisterAllName.."([whatFor]): missing 'self' or \"addonId\" to unregister events for.", 2) end - if select("#",...)==1 and ...==target then + if getn(arg)==1 and arg[1]==target then error("Usage: "..UnregisterAllName.."([whatFor]): supply a meaningful 'self' or \"addonId\"", 2) end - for i=1,select("#",...) do - local self = select(i,...) + for i=1,getn(arg) do + local self = arg[i] if registry.insertQueue then for eventname, callbacks in pairs(registry.insertQueue) do if callbacks[self] then diff --git a/ElvUI/Libraries/LibStub/LibStub.lua b/ElvUI/Libraries/LibStub/LibStub.lua index cf5c842..929d980 100644 --- a/ElvUI/Libraries/LibStub/LibStub.lua +++ b/ElvUI/Libraries/LibStub/LibStub.lua @@ -1,25 +1,19 @@ --- $Id: LibStub.lua 103 2014-10-16 03:02:50Z mikk $ --- LibStub is a simple versioning stub meant for use in Libraries. http://www.wowace.com/addons/libstub/ for more info --- LibStub is hereby placed in the Public Domain --- Credits: Kaelten, Cladhaire, ckknight, Mikk, Ammo, Nevcairiel, joshborke +-- LibStub is a simple versioning stub meant for use in Libraries. http://www.wowace.com/wiki/LibStub for more info +-- LibStub is hereby placed in the Public Domain Credits: Kaelten, Cladhaire, ckknight, Mikk, Ammo, Nevcairiel, joshborke local LIBSTUB_MAJOR, LIBSTUB_MINOR = "LibStub", 2 -- NEVER MAKE THIS AN SVN REVISION! IT NEEDS TO BE USABLE IN ALL REPOS! +local _G = _G +local find, format = string.find, string.format local LibStub = _G[LIBSTUB_MAJOR] --- Check to see is this version of the stub is obsolete if not LibStub or LibStub.minor < LIBSTUB_MINOR then LibStub = LibStub or {libs = {}, minors = {} } _G[LIBSTUB_MAJOR] = LibStub LibStub.minor = LIBSTUB_MINOR - -- LibStub:NewLibrary(major, minor) - -- major (string) - the major version of the library - -- minor (string or number ) - the minor version of the library - -- - -- returns nil if a newer or same version of the lib is already present - -- returns empty library object or old library object if upgrade is needed function LibStub:NewLibrary(major, minor) assert(type(major) == "string", "Bad argument #2 to `NewLibrary' (string expected)") - minor = assert(tonumber(strmatch(minor, "%d+")), "Minor version must either be a number or contain a number.") + local _, _, num = find(minor, "(%d+)") + minor = assert(tonumber(num), "Minor version must either be a number or contain a number.") local oldminor = self.minors[major] if oldminor and oldminor >= minor then return nil end @@ -27,25 +21,13 @@ if not LibStub or LibStub.minor < LIBSTUB_MINOR then return self.libs[major], oldminor end - -- LibStub:GetLibrary(major, [silent]) - -- major (string) - the major version of the library - -- silent (boolean) - if true, library is optional, silently return nil if its not found - -- - -- throws an error if the library can not be found (except silent is set) - -- returns the library object if found function LibStub:GetLibrary(major, silent) if not self.libs[major] and not silent then - error(("Cannot find a library instance of %q."):format(tostring(major)), 2) + error(format("Cannot find a library instance of %q.", tostring(major)), 2) end return self.libs[major], self.minors[major] end - -- LibStub:IterateLibraries() - -- - -- Returns an iterator for the currently registered libraries - function LibStub:IterateLibraries() - return pairs(self.libs) - end - + function LibStub:IterateLibraries() return pairs(self.libs) end setmetatable(LibStub, { __call = LibStub.GetLibrary }) end diff --git a/ElvUI_Config/Libraries/AceConfig-3.0/AceConfig-3.0.lua b/ElvUI_Config/Libraries/AceConfig-3.0/AceConfig-3.0.lua index 49aef64..22dec4a 100644 --- a/ElvUI_Config/Libraries/AceConfig-3.0/AceConfig-3.0.lua +++ b/ElvUI_Config/Libraries/AceConfig-3.0/AceConfig-3.0.lua @@ -12,10 +12,10 @@ Very light wrapper library that combines all the AceConfig subcomponents into on ]] -local cfgreg = LibStub("AceConfigRegistry-3.0-ElvUI") -local cfgcmd = LibStub("AceConfigCmd-3.0-ElvUI") +local cfgreg = LibStub("AceConfigRegistry-3.0") +local cfgcmd = LibStub("AceConfigCmd-3.0") -local MAJOR, MINOR = "AceConfig-3.0-ElvUI", 3 +local MAJOR, MINOR = "AceConfig-3.0", 3 local AceConfig = LibStub:NewLibrary(MAJOR, MINOR) if not AceConfig then return end diff --git a/ElvUI_Config/Libraries/AceConfig-3.0/AceConfigCmd-3.0/AceConfigCmd-3.0.lua b/ElvUI_Config/Libraries/AceConfig-3.0/AceConfigCmd-3.0/AceConfigCmd-3.0.lua index 39bdc1b..8b119e6 100644 --- a/ElvUI_Config/Libraries/AceConfig-3.0/AceConfigCmd-3.0/AceConfigCmd-3.0.lua +++ b/ElvUI_Config/Libraries/AceConfig-3.0/AceConfigCmd-3.0/AceConfigCmd-3.0.lua @@ -14,9 +14,9 @@ REQUIRES: AceConsole-3.0 for command registration (loaded on demand) -- TODO: plugin args -local cfgreg = LibStub("AceConfigRegistry-3.0-ElvUI") +local cfgreg = LibStub("AceConfigRegistry-3.0") -local MAJOR, MINOR = "AceConfigCmd-3.0-ElvUI", 14 +local MAJOR, MINOR = "AceConfigCmd-3.0", 14 local AceConfigCmd = LibStub:NewLibrary(MAJOR, MINOR) if not AceConfigCmd then return end @@ -29,8 +29,10 @@ local AceConsoleName = "AceConsole-3.0" -- Lua APIs local strsub, strsplit, strlower, strmatch, strtrim = string.sub, string.split, string.lower, string.match, string.trim +local strgsub, strupper, strfind, strlen, strbyte, strgmatch = string.gsub, string.upper, string.find, string.len, string.byte, string.gmatch local format, tonumber, tostring = string.format, tonumber, tostring -local tsort, tinsert = table.sort, table.insert +local tsort, tinsert, getn = table.sort, table.insert, table.getn +local fmod = math.fmod local select, pairs, next, type = select, pairs, next, type local error, assert = error, assert @@ -64,9 +66,9 @@ local funcmsg = "expected function or member name" -- pickfirstset() - picks the first non-nil value and returns it local function pickfirstset(...) - for i=1,select("#",...) do - if select(i,...)~=nil then - return select(i,...) + for i=1,getn(arg) do + if arg[i]~=nil then + return arg[i] end end end @@ -101,12 +103,12 @@ local function callmethod(info, inputpos, tab, methodtype, ...) info.type = tab.type if type(method)=="function" then - return method(info, ...) + return method(info, unpack(arg)) elseif type(method)=="string" then if type(info.handler[method])~="function" then err(info, inputpos, "'"..methodtype.."': '"..method.."' is not a member function of "..tostring(info.handler)) end - return info.handler[method](info.handler, info, ...) + return info.handler[method](info.handler, info, unpack(arg)) else assert(false) -- type should have already been checked on read end @@ -122,7 +124,11 @@ local function callfunction(info, tab, methodtype, ...) info.type = tab.type if type(method)=="function" then - return method(info, ...) + if getn(arg) > 0 then + return method(info, unpack(arg)) + else + return method(info) + end else assert(false) -- type should have already been checked on read end @@ -132,7 +138,7 @@ end local function do_final(info, inputpos, tab, methodtype, ...) if info.validate then - local res = callmethod(info,inputpos,tab,"validate",...) + local res = callmethod(info,inputpos,tab,"validate",unpack(arg)) if type(res)=="string" then usererr(info, inputpos, "'"..strsub(info.input, inputpos).."' - "..res) return @@ -140,7 +146,7 @@ local function do_final(info, inputpos, tab, methodtype, ...) end -- console ignores .confirm - callmethod(info,inputpos,tab,methodtype, ...) + callmethod(info,inputpos,tab,methodtype, unpack(arg)) end @@ -222,16 +228,16 @@ local function showhelp(info, inputpos, tab, depth, noHead) local o2 = refTbl[two].order or 100 if type(o1) == "function" or type(o1) == "string" then info.order = o1 - info[#info+1] = one + tinsert(info, one) o1 = callmethod(info, inputpos, refTbl[one], "order") - info[#info] = nil + tremove(info) info.order = nil end if type(o2) == "function" or type(o1) == "string" then info.order = o2 - info[#info+1] = two + tinsert(info, two) o2 = callmethod(info, inputpos, refTbl[two], "order") - info[#info] = nil + tremove(info) info.order = nil end if o1<0 and o2<0 then return o1 4) and not _G["KEY_" .. text] then + if not strfind(text,"^F%d+$") and text ~= "CAPSLOCK" and strlen(text) ~= 1 and (strbyte(text) < 128 or strlen(text) > 4) and not _G["KEY_" .. text] then return false end local s = text @@ -357,7 +363,7 @@ local function handle(info, inputpos, tab, depth, retfalse) if tab.plugins and type(tab.plugins)~="table" then err(info,inputpos) end -- grab next arg from input - local _,nextpos,arg = (info.input):find(" *([^ ]+) *", inputpos) + local _,nextpos,arg = strfind(info.input, " *([^ ]+) *", inputpos) if not arg then showhelp(info, inputpos, tab, depth) return @@ -370,16 +376,16 @@ local function handle(info, inputpos, tab, depth, retfalse) -- is this child an inline group? if so, traverse into it if v.type=="group" and pickfirstset(v.cmdInline, v.inline, false) then - info[depth+1] = k + tinsert(info,k) if handle(info, inputpos, v, depth+1, true)==false then - info[depth+1] = nil + tremove(info) -- wasn't found in there, but that's ok, we just keep looking down here else return -- done, name was found in inline group end -- matching name and not a inline group - elseif strlower(arg)==strlower(k:gsub(" ", "_")) then - info[depth+1] = k + elseif strlower(arg)==strlower(strgsub(k, " ", "_")) then + tinsert(info,k) return handle(info,nextpos,v,depth+1) end end @@ -471,7 +477,7 @@ local function handle(info, inputpos, tab, depth, retfalse) return end if type(info.step)=="number" then - val = val- (val % info.step) + val = val- fmod(val, info.step) end if type(info.min)=="number" and val 0 then @@ -352,10 +355,10 @@ local function BuildSortedOptionsTable(group, keySort, opts, options, path, appN tinsert(keySort, k) opts[k] = v - path[#path+1] = k + tinsert(path,k) tempOrders[k] = GetOptionsMemberValue("order", v, options, path, appName) tempNames[k] = GetOptionsMemberValue("name", v, options, path, appName) - path[#path] = nil + tremove(path) end end end @@ -366,10 +369,10 @@ local function BuildSortedOptionsTable(group, keySort, opts, options, path, appN tinsert(keySort, k) opts[k] = v - path[#path+1] = k + tinsert(path,k) tempOrders[k] = GetOptionsMemberValue("order", v, options, path, appName) tempNames[k] = GetOptionsMemberValue("name", v, options, path, appName) - path[#path] = nil + tremove(path) end end @@ -382,7 +385,7 @@ end local function DelTree(tree) if tree.children then local childs = tree.children - for i = 1, #childs do + for i = 1, getn(childs) do DelTree(childs[i]) del(childs[i]) end @@ -402,7 +405,7 @@ local function CleanUserData(widget, event) local tree = user.tree widget:SetTree(nil) if tree then - for i = 1, #tree do + for i = 1, getn(tree) do DelTree(tree[i]) del(tree[i]) end @@ -444,7 +447,7 @@ function AceConfigDialog:GetStatusTable(appName, path) status = status[appName] if path then - for i = 1, #path do + for i = 1, getn(path) do local v = path[i] if not status.children[v] then status.children[v] = {} @@ -468,7 +471,7 @@ function AceConfigDialog:SelectGroup(appName, ...) local app = reg:GetOptionsTable(appName) if not app then - error(("%s isn't registed with AceConfigRegistry, unable to open config"):format(appName), 2) + error(format("%s isn't registed with AceConfigRegistry, unable to open config", appName), 2) end local options = app("dialog", MAJOR) local group = options @@ -480,8 +483,8 @@ function AceConfigDialog:SelectGroup(appName, ...) local treevalue local treestatus - for n = 1, select("#",...) do - local key = select(n, ...) + for n = 1, getn(arg) do + local key = arg[n] if group.childGroups == "tab" or group.childGroups == "select" then --if this is a tab or select group, select the group @@ -597,9 +600,11 @@ local function confirmPopup(appName, rootframe, basepath, info, message, func, . AceConfigDialog:Open(appName, rootframe, unpack(basepath or emptyTbl)) del(info) end - for i = 1, select("#", ...) do - t[i] = select(i, ...) or false + local x = getn(arg) + for i = 1, x do + t[i] = arg[i] or false end + setn(t, x) t.timeout = 0 t.whileDead = 1 t.hideOnEscape = 1 @@ -659,7 +664,8 @@ local function ActivateControl(widget, event, ...) handler = group.handler or handler confirm = group.confirm validate = group.validate - for i = 1, #path do + local x = getn(path) + for i = 1, x do local v = path[i] group = GetSubOption(group, v) info[i] = v @@ -674,6 +680,7 @@ local function ActivateControl(widget, event, ...) validate = group.validate end end + setn(info, x) info.options = options info.appName = user.appName @@ -699,7 +706,7 @@ local function ActivateControl(widget, event, ...) if option.type == "input" then if type(pattern)=="string" then - if not strmatch(..., pattern) then + if not find(arg[1], pattern) then validated = false end end @@ -709,13 +716,13 @@ local function ActivateControl(widget, event, ...) if validated and option.type ~= "execute" then if type(validate) == "string" then if handler and handler[validate] then - success, validated = safecall(handler[validate], handler, info, ...) + success, validated = safecall(handler[validate], handler, info, unpack(arg)) if not success then validated = false end else error(format("Method %s doesn't exist in handler for type execute", validate)) end elseif type(validate) == "function" then - success, validated = safecall(validate, info, ...) + success, validated = safecall(validate, info, unpack(arg)) if not success then validated = false end end end @@ -749,7 +756,7 @@ local function ActivateControl(widget, event, ...) --call confirm func/method if type(confirm) == "string" then if handler and handler[confirm] then - success, confirm = safecall(handler[confirm], handler, info, ...) + success, confirm = safecall(handler[confirm], handler, info, unpack(arg)) if success and type(confirm) == "string" then confirmText = confirm confirm = true @@ -760,7 +767,7 @@ local function ActivateControl(widget, event, ...) error(format("Method %s doesn't exist in handler for type confirm", confirm)) end elseif type(confirm) == "function" then - success, confirm = safecall(confirm, info, ...) + success, confirm = safecall(confirm, info, unpack(arg)) if success and type(confirm) == "string" then confirmText = confirm confirm = true @@ -795,12 +802,12 @@ local function ActivateControl(widget, event, ...) local basepath = user.rootframe:GetUserData("basepath") if type(func) == "string" then if handler and handler[func] then - confirmPopup(user.appName, rootframe, basepath, info, confirmText, handler[func], handler, info, ...) + confirmPopup(user.appName, rootframe, basepath, info, confirmText, handler[func], handler, info, unpack(arg)) else error(format("Method %s doesn't exist in handler for type func", func)) end elseif type(func) == "function" then - confirmPopup(user.appName, rootframe, basepath, info, confirmText, func, info, ...) + confirmPopup(user.appName, rootframe, basepath, info, confirmText, func, info, unpack(arg)) end --func will be called and info deleted when the confirm dialog is responded to return @@ -810,12 +817,12 @@ local function ActivateControl(widget, event, ...) --call the function if type(func) == "string" then if handler and handler[func] then - safecall(handler[func],handler, info, ...) + safecall(handler[func],handler, info, unpack(arg)) else error(format("Method %s doesn't exist in handler for type func", func)) end elseif type(func) == "function" then - safecall(func,info, ...) + safecall(func,info, unpack(arg)) end @@ -873,7 +880,7 @@ end --called from a checkbox that is part of an internally created multiselect group --this type is safe to refresh on activation of one control local function ActivateMultiControl(widget, event, ...) - ActivateControl(widget, event, widget:GetUserData("value"), ...) + ActivateControl(widget, event, widget:GetUserData("value"), unpack(arg)) local user = widget:GetUserDataTable() local iscustom = user.rootframe:GetUserData("iscustom") local basepath = user.rootframe:GetUserData("basepath") or emptyTbl @@ -960,18 +967,18 @@ local function BuildSelect(group, options, path, appName) BuildSortedOptionsTable(group, keySort, opts, options, path, appName) - for i = 1, #keySort do + for i = 1, getn(keySort) do local k = keySort[i] local v = opts[k] if v.type == "group" then - path[#path+1] = k + tinsert(path, k) local inline = pickfirstset(v.dialogInline,v.guiInline,v.inline, false) local hidden = CheckOptionHidden(v, options, path, appName) if not inline and not hidden then groups[k] = GetOptionsMemberValue("name", v, options, path, appName) tinsert(order, k) end - path[#path] = nil + tremove(path) end end @@ -987,11 +994,11 @@ local function BuildSubGroups(group, tree, options, path, appName) BuildSortedOptionsTable(group, keySort, opts, options, path, appName) - for i = 1, #keySort do + for i = 1, getn(keySort) do local k = keySort[i] local v = opts[k] if v.type == "group" then - path[#path+1] = k + tinsert(path, k) local inline = pickfirstset(v.dialogInline,v.guiInline,v.inline, false) local hidden = CheckOptionHidden(v, options, path, appName) if not inline and not hidden then @@ -1007,7 +1014,7 @@ local function BuildSubGroups(group, tree, options, path, appName) BuildSubGroups(v,entry, options, path, appName) end end - path[#path] = nil + tremove(path) end end @@ -1022,11 +1029,11 @@ local function BuildGroups(group, options, path, appName, recurse) BuildSortedOptionsTable(group, keySort, opts, options, path, appName) - for i = 1, #keySort do + for i = 1, getn(keySort) do local k = keySort[i] local v = opts[k] if v.type == "group" then - path[#path+1] = k + tinsert(path,k) local inline = pickfirstset(v.dialogInline,v.guiInline,v.inline, false) local hidden = CheckOptionHidden(v, options, path, appName) if not inline and not hidden then @@ -1041,7 +1048,7 @@ local function BuildGroups(group, options, path, appName, recurse) BuildSubGroups(v,entry, options, path, appName) end end - path[#path] = nil + tremove(path) end end del(keySort) @@ -1051,9 +1058,11 @@ end local function InjectInfo(control, options, option, path, rootframe, appName) local user = control:GetUserDataTable() - for i = 1, #path do + local x = getn(path) + for i = 1, x do user[i] = path[i] end + setn(user, x) user.rootframe = rootframe user.option = option user.options = options @@ -1078,7 +1087,7 @@ local function FeedOptions(appName, options,container,rootframe,path,group,inlin BuildSortedOptionsTable(group, keySort, opts, options, path, appName) - for i = 1, #keySort do + for i = 1, getn(keySort) do local k = keySort[i] local v = opts[k] tinsert(path, k) @@ -1144,7 +1153,7 @@ local function FeedOptions(appName, options,container,rootframe,path,group,inlin local controlType = v.dialogControl or v.control or (v.multiline and "MultiLineEditBox") or "EditBox" control = gui:Create(controlType) if not control then - geterrorhandler()(("Invalid Custom Control Type - %s"):format(tostring(controlType))) + geterrorhandler()(format("Invalid Custom Control Type - %s", tostring(controlType))) control = gui:Create(v.multiline and "MultiLineEditBox" or "EditBox") end @@ -1209,7 +1218,7 @@ local function FeedOptions(appName, options,container,rootframe,path,group,inlin local optionValue = GetOptionsMemberValue("get",v, options, path, appName) local t = {} for value, text in pairs(values) do - t[#t+1]=value + tinsert(t, value) end tsort(t) for k, value in ipairs(t) do @@ -1240,12 +1249,12 @@ local function FeedOptions(appName, options,container,rootframe,path,group,inlin local controlType = v.dialogControl or v.control or "Dropdown" control = gui:Create(controlType) if not control then - geterrorhandler()(("Invalid Custom Control Type - %s"):format(tostring(controlType))) + geterrorhandler()(format("Invalid Custom Control Type - %s", tostring(controlType))) control = gui:Create("Dropdown") end local itemType = v.itemControl if itemType and not gui:GetWidgetVersion(itemType) then - geterrorhandler()(("Invalid Custom Item Type - %s"):format(tostring(itemType))) + geterrorhandler()(format("Invalid Custom Item Type - %s", tostring(itemType))) itemType = nil end control:SetLabel(name) @@ -1275,7 +1284,7 @@ local function FeedOptions(appName, options,container,rootframe,path,group,inlin if controlType then control = gui:Create(controlType) if not control then - geterrorhandler()(("Invalid Custom Control Type - %s"):format(tostring(controlType))) + geterrorhandler()(format("Invalid Custom Control Type - %s", tostring(controlType))) end end if control then @@ -1296,7 +1305,7 @@ local function FeedOptions(appName, options,container,rootframe,path,group,inlin control:SetWidth(width_multiplier) end --check:SetTriState(v.tristate) - for i = 1, #valuesort do + for i = 1, getn(valuesort) do local key = valuesort[i] local value = GetOptionsMemberValue("get",v, options, path, appName, key) control:SetItemValue(key,value) @@ -1309,7 +1318,7 @@ local function FeedOptions(appName, options,container,rootframe,path,group,inlin control:PauseLayout() local width = GetOptionsMemberValue("width",v,options,path,appName) - for i = 1, #valuesort do + for i = 1, getn(valuesort) do local value = valuesort[i] local text = values[value] local check = gui:Create("CheckBox") @@ -1341,7 +1350,7 @@ local function FeedOptions(appName, options,container,rootframe,path,group,inlin del(valuesort) elseif v.type == "color" then - control = gui:Create("ColorPicker-ElvUI") + control = gui:Create("ColorPicker") control:SetLabel(name) control:SetHasAlpha(GetOptionsMemberValue("hasAlpha",v, options, path, appName)) control:SetColor(GetOptionsMemberValue("get",v, options, path, appName)) @@ -1433,8 +1442,8 @@ local function FeedOptions(appName, options,container,rootframe,path,group,inlin end local function BuildPath(path, ...) - for i = 1, select("#",...) do - tinsert(path, (select(i,...))) + for i = 1, getn(arg) do + tinsert(path, arg[i]) end end @@ -1448,13 +1457,15 @@ local function TreeOnButtonEnter(widget, event, uniquevalue, button) local appName = user.appName local feedpath = new() - for i = 1, #path do + local x = getn(path) + for i = 1, x do feedpath[i] = path[i] end + setn(feedpath, x) - BuildPath(feedpath, ("\001"):split(uniquevalue)) + BuildPath(feedpath, strsplit("\001", uniquevalue)) local group = options - for i = 1, #feedpath do + for i = 1, getn(feedpath) do if not group then return end group = GetSubOption(group, feedpath[i]) end @@ -1462,7 +1473,7 @@ local function TreeOnButtonEnter(widget, event, uniquevalue, button) local name = GetOptionsMemberValue("name", group, options, feedpath, appName) local desc = GetOptionsMemberValue("desc", group, options, feedpath, appName) - GameTooltip:SetOwner(button, "ANCHOR_CURSOR") + GameTooltip:SetOwner(button, "ANCHOR_NONE") if widget.type == "TabGroup" then GameTooltip:SetPoint("BOTTOM",button,"TOP") else @@ -1488,14 +1499,16 @@ local function GroupExists(appName, options, path, uniquevalue) local feedpath = new() local temppath = new() - for i = 1, #path do + local x = getn(path) + for i = 1, x do feedpath[i] = path[i] end + setn(feedpath, x) - BuildPath(feedpath, ("\001"):split(uniquevalue)) + BuildPath(feedpath, strsplit("\001", uniquevalue)) local group = options - for i = 1, #feedpath do + for i = 1, getn(feedpath) do local v = feedpath[i] temppath[i] = v group = GetSubOption(group, v) @@ -1521,13 +1534,15 @@ local function GroupSelected(widget, event, uniquevalue) local rootframe = user.rootframe local feedpath = new() - for i = 1, #path do + local x = getn(path) + for i = 1, x do feedpath[i] = path[i] end + setn(feedpath, x) - BuildPath(feedpath, ("\001"):split(uniquevalue)) + BuildPath(feedpath, strsplit("\001", uniquevalue)) local group = options - for i = 1, #feedpath do + for i = 1, getn(feedpath) do group = GetSubOption(group, feedpath[i]) end widget:ReleaseChildren() @@ -1561,10 +1576,10 @@ function AceConfigDialog:FeedGroup(appName,options,container,rootframe,path, isR local grouptype, parenttype = options.childGroups, "none" - for i = 1, #path do + for i = 1, getn(path) do local v = path[i] group = GetSubOption(group, v) - inline = inline or pickfirstset(v.dialogInline,v.guiInline,v.inline, false) + inline = inline or pickfirstset(group.dialogInline,group.guiInline,group.inline, false) parenttype = grouptype grouptype = group.childGroups end @@ -1639,7 +1654,7 @@ function AceConfigDialog:FeedGroup(appName,options,container,rootframe,path, isR tab:SetTabs(tabs) tab:SetUserData("tablist", tabs) - for i = 1, #tabs do + for i = 1, getn(tabs) do local entry = tabs[i] if not entry.disabled then tab:SelectTab((GroupExists(appName, options, path,status.groups.selected) and status.groups.selected) or entry.value) @@ -1699,7 +1714,7 @@ function AceConfigDialog:FeedGroup(appName,options,container,rootframe,path, isR tree:SetTree(treedefinition) tree:SetUserData("tree",treedefinition) - for i = 1, #treedefinition do + for i = 1, getn(treedefinition) do local entry = treedefinition[i] if not entry.disabled then tree:SelectByValue((GroupExists(appName, options, path,status.groups.selected) and status.groups.selected) or entry.value) @@ -1715,7 +1730,7 @@ end local old_CloseSpecialWindows -local function RefreshOnUpdate(this) +local function RefreshOnUpdate() for appName in pairs(this.closing) do if AceConfigDialog.OpenFrames[appName] then AceConfigDialog.OpenFrames[appName]:Hide() @@ -1819,7 +1834,7 @@ function AceConfigDialog:Open(appName, container, ...) end local app = reg:GetOptionsTable(appName) if not app then - error(("%s isn't registed with AceConfigRegistry, unable to open config"):format(appName), 2) + error(format("%s isn't registed with AceConfigRegistry, unable to open config", appName), 2) end local options = app("dialog", MAJOR) @@ -1834,13 +1849,13 @@ function AceConfigDialog:Open(appName, container, ...) tinsert(path, container) container = nil end - for n = 1, select("#",...) do - tinsert(path, (select(n, ...))) + for n = 1, getn(arg) do + tinsert(path, arg[n]) end local option = options - if type(container) == "table" and container.type == "BlizOptionsGroup" and #path > 0 then - for i = 1, #path do + if type(container) == "table" and container.type == "BlizOptionsGroup" and getn(path) > 0 then + for i = 1, getn(path) do option = options.args[path[i]] end name = format("%s - %s", name, GetOptionsMemberValue("name", option, options, path, appName)) @@ -1852,7 +1867,7 @@ function AceConfigDialog:Open(appName, container, ...) f:ReleaseChildren() f:SetUserData("appName", appName) f:SetUserData("iscustom", true) - if #path > 0 then + if getn(path) > 0 then f:SetUserData("basepath", copy(path)) end local status = AceConfigDialog:GetStatusTable(appName) @@ -1878,7 +1893,7 @@ function AceConfigDialog:Open(appName, container, ...) f:ReleaseChildren() f:SetCallback("OnClose", FrameOnClose) f:SetUserData("appName", appName) - if #path > 0 then + if getn(path) > 0 then f:SetUserData("basepath", copy(path)) end f:SetTitle(name or "") @@ -1944,8 +1959,8 @@ function AceConfigDialog:AddToBlizOptions(appName, name, parent, ...) local BlizOptions = AceConfigDialog.BlizOptions local key = appName - for n = 1, select("#", ...) do - key = key.."\001"..select(n, ...) + for n = 1, getn(arg) do + key = key.."\001"..arg[n] end if not BlizOptions[appName] then @@ -1959,10 +1974,10 @@ function AceConfigDialog:AddToBlizOptions(appName, name, parent, ...) group:SetTitle(name or appName) group:SetUserData("appName", appName) - if select("#", ...) > 0 then + if getn(arg) > 0 then local path = {} - for n = 1, select("#",...) do - tinsert(path, (select(n, ...))) + for n = 1, getn(arg) do + tinsert(path, arg[n]) end group:SetUserData("path", path) end @@ -1971,6 +1986,6 @@ function AceConfigDialog:AddToBlizOptions(appName, name, parent, ...) InterfaceOptions_AddCategory(group.frame) return group.frame else - error(("%s has already been added to the Blizzard Options Window with the given path"):format(appName), 2) + error(format("%s has already been added to the Blizzard Options Window with the given path", appName), 2) end end diff --git a/ElvUI_Config/Libraries/AceConfig-3.0/AceConfigRegistry-3.0/AceConfigRegistry-3.0.lua b/ElvUI_Config/Libraries/AceConfig-3.0/AceConfigRegistry-3.0/AceConfigRegistry-3.0.lua index e6f67a6..ebf750e 100644 --- a/ElvUI_Config/Libraries/AceConfig-3.0/AceConfigRegistry-3.0/AceConfigRegistry-3.0.lua +++ b/ElvUI_Config/Libraries/AceConfig-3.0/AceConfigRegistry-3.0/AceConfigRegistry-3.0.lua @@ -11,7 +11,7 @@ -- @release $Id: AceConfigRegistry-3.0.lua 1105 2013-12-08 22:11:58Z nevcairiel $ local CallbackHandler = LibStub:GetLibrary("CallbackHandler-1.0") -local MAJOR, MINOR = "AceConfigRegistry-3.0-ElvUI", 17 +local MAJOR, MINOR = "AceConfigRegistry-3.0", 17 local AceConfigRegistry = LibStub:NewLibrary(MAJOR, MINOR) if not AceConfigRegistry then return end @@ -23,9 +23,9 @@ if not AceConfigRegistry.callbacks then end -- Lua APIs -local tinsert, tconcat = table.insert, table.concat +local tinsert, tconcat, getn = table.insert, table.concat, table.getn local strfind, strmatch = string.find, string.match -local type, tostring, select, pairs = type, tostring, select, pairs +local type, tostring, pairs, unpack = type, tostring, pairs, unpack local error, assert = error, assert ----------------------------------------------------------------------- @@ -44,8 +44,8 @@ AceConfigRegistry.validated = { local function err(msg, errlvl, ...) local t = {} - for i=select("#",...),1,-1 do - tinsert(t, (select(i, ...))) + for i=getn(arg),1,-1 do + tinsert(t, arg[i]) end error(MAJOR..":ValidateOptionsTable(): "..tconcat(t,".")..msg, errlvl+2) end @@ -90,6 +90,7 @@ local basekeys={ func=optmethodfalse, arg={["*"]=true}, width=optstring, + -- below here were created by ElvUI -- buttonElvUI=optmethodbool, } @@ -164,7 +165,6 @@ local typedkeys={ }, color={ hasAlpha=optmethodbool, - reset=opttable, }, keybinding={ -- TODO @@ -174,10 +174,10 @@ local typedkeys={ local function validateKey(k,errlvl,...) errlvl=(errlvl or 0)+1 if type(k)~="string" then - err("["..tostring(k).."] - key is not a string", errlvl,...) + err("["..tostring(k).."] - key is not a string", errlvl,unpack(arg)) end if strfind(k, "[%c\127]") then - err("["..tostring(k).."] - key name contained control characters", errlvl,...) + err("["..tostring(k).."] - key name contained control characters", errlvl,unpack(arg)) end end @@ -186,11 +186,11 @@ local function validateVal(v, oktypes, errlvl,...) local isok=oktypes[type(v)] or oktypes["*"] if not isok then - err(": expected a "..oktypes._..", got '"..tostring(v).."'", errlvl,...) + err(": expected a "..oktypes._..", got '"..tostring(v).."'", errlvl,unpack(arg)) end if type(isok)=="table" then -- isok was a table containing specific values to be tested for! if not isok[v] then - err(": did not expect "..type(v).." value '"..tostring(v).."'", errlvl,...) + err(": did not expect "..type(v).." value '"..tostring(v).."'", errlvl,unpack(arg)) end end end @@ -199,47 +199,47 @@ local function validate(options,errlvl,...) errlvl=(errlvl or 0)+1 -- basic consistency if type(options)~="table" then - err(": expected a table, got a "..type(options), errlvl,...) + err(": expected a table, got a "..type(options), errlvl,unpack(arg)) end if type(options.type)~="string" then - err(".type: expected a string, got a "..type(options.type), errlvl,...) + err(".type: expected a string, got a "..type(options.type), errlvl,unpack(arg)) end -- get type and 'typedkeys' member local tk = typedkeys[options.type] if not tk then - err(".type: unknown type '"..options.type.."'", errlvl,...) + err(".type: unknown type '"..options.type.."'", errlvl,unpack(arg)) end -- make sure that all options[] are known parameters for k,v in pairs(options) do if not (tk[k] or basekeys[k]) then - err(": unknown parameter", errlvl,tostring(k),...) + err(": unknown parameter", errlvl,tostring(k),unpack(arg)) end end -- verify that required params are there, and that everything is the right type for k,oktypes in pairs(basekeys) do - validateVal(options[k], oktypes, errlvl,k,...) + validateVal(options[k], oktypes, errlvl,k,unpack(arg)) end for k,oktypes in pairs(tk) do - validateVal(options[k], oktypes, errlvl,k,...) + validateVal(options[k], oktypes, errlvl,k,unpack(arg)) end -- extra logic for groups if options.type=="group" then for k,v in pairs(options.args) do - validateKey(k,errlvl,"args",...) - validate(v, errlvl,k,"args",...) + validateKey(k,errlvl,"args",unpack(arg)) + validate(v, errlvl,k,"args",unpack(arg)) end if options.plugins then for plugname,plugin in pairs(options.plugins) do if type(plugin)~="table" then - err(": expected a table, got '"..tostring(plugin).."'", errlvl,tostring(plugname),"plugins",...) + err(": expected a table, got '"..tostring(plugin).."'", errlvl,tostring(plugname),"plugins",unpack(arg)) end for k,v in pairs(plugin) do - validateKey(k,errlvl,tostring(plugname),"plugins",...) - validate(v, errlvl,k,tostring(plugname),"plugins",...) + validateKey(k,errlvl,tostring(plugname),"plugins",unpack(arg)) + validate(v, errlvl,k,tostring(plugname),"plugins",unpack(arg)) end end end diff --git a/ElvUI_Config/Libraries/AceGUI-3.0-SharedMediaWidgets/BackgroundWidget.lua b/ElvUI_Config/Libraries/AceGUI-3.0-SharedMediaWidgets/BackgroundWidget.lua index 0b75952..d9a4b37 100644 --- a/ElvUI_Config/Libraries/AceGUI-3.0-SharedMediaWidgets/BackgroundWidget.lua +++ b/ElvUI_Config/Libraries/AceGUI-3.0-SharedMediaWidgets/BackgroundWidget.lua @@ -6,6 +6,10 @@ local Media = LibStub("LibSharedMedia-3.0") local AGSMW = LibStub("AceGUISharedMediaWidgets-1.0") +local next, ipairs, pairs = next, ipairs, pairs +local upper = string.upper +local tinsert, tremove, sort = table.insert, table.remove, table.sort + do local widgetType = "LSM30_Background" local widgetVersion = 11 @@ -15,10 +19,10 @@ do self:ClearAllPoints() self:Hide() self.check:Hide() - table.insert(contentFrameCache, self) + tinsert(contentFrameCache, self) end - local function ContentOnClick(this, button) + local function ContentOnClick() local self = this.obj self:Fire("OnValueChanged", this.text:GetText()) if self.dropdown then @@ -26,7 +30,7 @@ do end end - local function ContentOnEnter(this, button) + local function ContentOnEnter() local self = this.obj local text = this.text:GetText() local background = self.list[text] ~= text and self.list[text] or Media:Fetch('background',text) @@ -36,7 +40,7 @@ do local function GetContentLine() local frame if next(contentFrameCache) then - frame = table.remove(contentFrameCache) + frame = tremove(contentFrameCache) else frame = CreateFrame("Button", nil, UIParent) --frame:SetWidth(200) @@ -140,7 +144,7 @@ do end local function textSort(a,b) - return string.upper(a) < string.upper(b) + return upper(a) < upper(b) end local sortedlist = {} @@ -156,9 +160,9 @@ do self.dropdown:SetPoint("TOPLEFT", self.frame, "BOTTOMLEFT") self.dropdown:SetPoint("TOPRIGHT", self.frame, "BOTTOMRIGHT", width < 160 and (160 - width) or 0, 0) for k, v in pairs(self.list) do - sortedlist[#sortedlist+1] = k + tinsert(sortedlist, k) end - table.sort(sortedlist, textSort) + sort(sortedlist, textSort) for i, k in ipairs(sortedlist) do local f = GetContentLine() f.text:SetText(k) @@ -180,18 +184,18 @@ do end end - local function OnHide(this) + local function OnHide() local self = this.obj if self.dropdown then self.dropdown = AGSMW:ReturnDropDownFrame(self.dropdown) end end - local function Drop_OnEnter(this) + local function Drop_OnEnter() this.obj:Fire("OnEnter") end - local function Drop_OnLeave(this) + local function Drop_OnLeave() this.obj:Fire("OnLeave") end diff --git a/ElvUI_Config/Libraries/AceGUI-3.0-SharedMediaWidgets/BorderWidget.lua b/ElvUI_Config/Libraries/AceGUI-3.0-SharedMediaWidgets/BorderWidget.lua index 0cd2959..fc9415f 100644 --- a/ElvUI_Config/Libraries/AceGUI-3.0-SharedMediaWidgets/BorderWidget.lua +++ b/ElvUI_Config/Libraries/AceGUI-3.0-SharedMediaWidgets/BorderWidget.lua @@ -6,6 +6,10 @@ local Media = LibStub("LibSharedMedia-3.0") local AGSMW = LibStub("AceGUISharedMediaWidgets-1.0") +local next, ipairs, pairs = next, ipairs, pairs +local upper = string.upper +local tinsert, tremove, sort = table.insert, table.remove, table.sort + do local widgetType = "LSM30_Border" local widgetVersion = 11 @@ -15,7 +19,7 @@ do self:ClearAllPoints() self:Hide() self.check:Hide() - table.insert(contentFrameCache, self) + tinsert(contentFrameCache, self) end local function ContentOnClick(this, button) @@ -39,7 +43,7 @@ do local function GetContentLine() local frame if next(contentFrameCache) then - frame = table.remove(contentFrameCache) + frame = tremove(contentFrameCache) else frame = CreateFrame("Button", nil, UIParent) --frame:SetWidth(200) @@ -135,7 +139,7 @@ do end local function textSort(a,b) - return string.upper(a) < string.upper(b) + return upper(a) < upper(b) end local sortedlist = {} @@ -151,9 +155,9 @@ do self.dropdown:SetPoint("TOPLEFT", self.frame, "BOTTOMLEFT") self.dropdown:SetPoint("TOPRIGHT", self.frame, "BOTTOMRIGHT", width < 160 and (160 - width) or 0, 0) for k, v in pairs(self.list) do - sortedlist[#sortedlist+1] = k + tinsert(sortedlist, k) end - table.sort(sortedlist, textSort) + sort(sortedlist, textSort) for i, k in ipairs(sortedlist) do local f = GetContentLine() f.text:SetText(k) diff --git a/ElvUI_Config/Libraries/AceGUI-3.0-SharedMediaWidgets/FontWidget.lua b/ElvUI_Config/Libraries/AceGUI-3.0-SharedMediaWidgets/FontWidget.lua index eadf35f..9f0e6e7 100644 --- a/ElvUI_Config/Libraries/AceGUI-3.0-SharedMediaWidgets/FontWidget.lua +++ b/ElvUI_Config/Libraries/AceGUI-3.0-SharedMediaWidgets/FontWidget.lua @@ -6,6 +6,10 @@ local Media = LibStub("LibSharedMedia-3.0") local AGSMW = LibStub("AceGUISharedMediaWidgets-1.0") +local next, ipairs, pairs = next, ipairs, pairs +local upper = string.upper +local tinsert, tremove, sort = table.insert, table.remove, table.sort + do local widgetType = "LSM30_Font" local widgetVersion = 11 @@ -15,10 +19,10 @@ do self:ClearAllPoints() self:Hide() self.check:Hide() - table.insert(contentFrameCache, self) + tinsert(contentFrameCache, self) end - local function ContentOnClick(this, button) + local function ContentOnClick() local self = this.obj self:Fire("OnValueChanged", this.text:GetText()) if self.dropdown then @@ -29,7 +33,7 @@ do local function GetContentLine() local frame if next(contentFrameCache) then - frame = table.remove(contentFrameCache) + frame = tremove(contentFrameCache) else frame = CreateFrame("Button", nil, UIParent) --frame:SetWidth(200) @@ -120,11 +124,11 @@ do end local function textSort(a,b) - return string.upper(a) < string.upper(b) + return upper(a) < upper(b) end local sortedlist = {} - local function ToggleDrop(this) + local function ToggleDrop() local self = this.obj if self.dropdown then self.dropdown = AGSMW:ReturnDropDownFrame(self.dropdown) @@ -136,9 +140,9 @@ do self.dropdown:SetPoint("TOPLEFT", self.frame, "BOTTOMLEFT") self.dropdown:SetPoint("TOPRIGHT", self.frame, "BOTTOMRIGHT", width < 160 and (160 - width) or 0, 0) for k, v in pairs(self.list) do - sortedlist[#sortedlist+1] = k + tinsert(sortedlist, k) end - table.sort(sortedlist, textSort) + sort(sortedlist, textSort) for i, k in ipairs(sortedlist) do local f = GetContentLine() local _, size, outline= f.text:GetFont() @@ -161,18 +165,18 @@ do end end - local function OnHide(this) + local function OnHide() local self = this.obj if self.dropdown then self.dropdown = AGSMW:ReturnDropDownFrame(self.dropdown) end end - local function Drop_OnEnter(this) + local function Drop_OnEnter() this.obj:Fire("OnEnter") end - local function Drop_OnLeave(this) + local function Drop_OnLeave() this.obj:Fire("OnLeave") end diff --git a/ElvUI_Config/Libraries/AceGUI-3.0-SharedMediaWidgets/SoundWidget.lua b/ElvUI_Config/Libraries/AceGUI-3.0-SharedMediaWidgets/SoundWidget.lua index 1d39c28..8eb88bb 100644 --- a/ElvUI_Config/Libraries/AceGUI-3.0-SharedMediaWidgets/SoundWidget.lua +++ b/ElvUI_Config/Libraries/AceGUI-3.0-SharedMediaWidgets/SoundWidget.lua @@ -6,6 +6,10 @@ local Media = LibStub("LibSharedMedia-3.0") local AGSMW = LibStub("AceGUISharedMediaWidgets-1.0") +local next, ipairs, pairs = next, ipairs, pairs +local upper = string.upper +local tinsert, tremove, sort = table.insert, table.remove, table.sort + do local widgetType = "LSM30_Sound" local widgetVersion = 11 @@ -15,10 +19,10 @@ do self:ClearAllPoints() self:Hide() self.check:Hide() - table.insert(contentFrameCache, self) + tinsert(contentFrameCache, self) end - local function ContentOnClick(this, button) + local function ContentOnClick() local self = this.obj self:Fire("OnValueChanged", this.text:GetText()) if self.dropdown then @@ -26,7 +30,7 @@ do end end - local function ContentSpeakerOnClick(this, button) + local function ContentSpeakerOnClick() local self = this.frame.obj local sound = this.frame.text:GetText() PlaySoundFile(self.list[sound] ~= sound and self.list[sound] or Media:Fetch('sound',sound), "Master") @@ -35,7 +39,7 @@ do local function GetContentLine() local frame if next(contentFrameCache) then - frame = table.remove(contentFrameCache) + frame = tremove(contentFrameCache) else frame = CreateFrame("Button", nil, UIParent) --frame:SetWidth(200) @@ -145,11 +149,11 @@ do end local function textSort(a,b) - return string.upper(a) < string.upper(b) + return upper(a) < upper(b) end local sortedlist = {} - local function ToggleDrop(this) + local function ToggleDrop() local self = this.obj if self.dropdown then self.dropdown = AGSMW:ReturnDropDownFrame(self.dropdown) @@ -161,9 +165,9 @@ do self.dropdown:SetPoint("TOPLEFT", self.frame, "BOTTOMLEFT") self.dropdown:SetPoint("TOPRIGHT", self.frame, "BOTTOMRIGHT", width < 160 and (160 - width) or 0, 0) for k, v in pairs(self.list) do - sortedlist[#sortedlist+1] = k + tinsert(sortedlist, k) end - table.sort(sortedlist, textSort) + sort(sortedlist, textSort) for i, k in ipairs(sortedlist) do local f = GetContentLine() f.text:SetText(k) @@ -183,22 +187,22 @@ do end end - local function OnHide(this) + local function OnHide() local self = this.obj if self.dropdown then self.dropdown = AGSMW:ReturnDropDownFrame(self.dropdown) end end - local function Drop_OnEnter(this) + local function Drop_OnEnter() this.obj:Fire("OnEnter") end - local function Drop_OnLeave(this) + local function Drop_OnLeave() this.obj:Fire("OnLeave") end - local function WidgetPlaySound(this) + local function WidgetPlaySound() local self = this.obj local sound = self.frame.text:GetText() PlaySoundFile(self.list[sound] ~= sound and self.list[sound] or Media:Fetch('sound',sound), "Master") diff --git a/ElvUI_Config/Libraries/AceGUI-3.0-SharedMediaWidgets/StatusbarWidget.lua b/ElvUI_Config/Libraries/AceGUI-3.0-SharedMediaWidgets/StatusbarWidget.lua index 2d0e32c..5d0a9f0 100644 --- a/ElvUI_Config/Libraries/AceGUI-3.0-SharedMediaWidgets/StatusbarWidget.lua +++ b/ElvUI_Config/Libraries/AceGUI-3.0-SharedMediaWidgets/StatusbarWidget.lua @@ -6,6 +6,10 @@ local Media = LibStub("LibSharedMedia-3.0") local AGSMW = LibStub("AceGUISharedMediaWidgets-1.0") +local next, ipairs, pairs = next, ipairs, pairs +local upper = string.upper +local tinsert, tremove, sort = table.insert, table.remove, table.sort + do local widgetType = "LSM30_Statusbar" local widgetVersion = 11 @@ -15,10 +19,10 @@ do self:ClearAllPoints() self:Hide() self.check:Hide() - table.insert(contentFrameCache, self) + tinsert(contentFrameCache, self) end - local function ContentOnClick(this, button) + local function ContentOnClick() local self = this.obj self:Fire("OnValueChanged", this.text:GetText()) if self.dropdown then @@ -29,7 +33,7 @@ do local function GetContentLine() local frame if next(contentFrameCache) then - frame = table.remove(contentFrameCache) + frame = tremove(contentFrameCache) else frame = CreateFrame("Button", nil, UIParent) --frame:SetWidth(200) @@ -129,11 +133,11 @@ do end local function textSort(a,b) - return string.upper(a) < string.upper(b) + return upper(a) < upper(b) end local sortedlist = {} - local function ToggleDrop(this) + local function ToggleDrop() local self = this.obj if self.dropdown then self.dropdown = AGSMW:ReturnDropDownFrame(self.dropdown) @@ -145,9 +149,9 @@ do self.dropdown:SetPoint("TOPLEFT", self.frame, "BOTTOMLEFT") self.dropdown:SetPoint("TOPRIGHT", self.frame, "BOTTOMRIGHT", width < 160 and (160 - width) or 0, 0) for k, v in pairs(self.list) do - sortedlist[#sortedlist+1] = k + tinsert(sortedlist, k) end - table.sort(sortedlist, textSort) + sort(sortedlist, textSort) for i, k in ipairs(sortedlist) do local f = GetContentLine() f.text:SetText(k) @@ -172,18 +176,18 @@ do end end - local function OnHide(this) + local function OnHide() local self = this.obj if self.dropdown then self.dropdown = AGSMW:ReturnDropDownFrame(self.dropdown) end end - local function Drop_OnEnter(this) + local function Drop_OnEnter() this.obj:Fire("OnEnter") end - local function Drop_OnLeave(this) + local function Drop_OnLeave() this.obj:Fire("OnLeave") end diff --git a/ElvUI_Config/Libraries/AceGUI-3.0-SharedMediaWidgets/prototypes.lua b/ElvUI_Config/Libraries/AceGUI-3.0-SharedMediaWidgets/prototypes.lua index 98bc818..d47f722 100644 --- a/ElvUI_Config/Libraries/AceGUI-3.0-SharedMediaWidgets/prototypes.lua +++ b/ElvUI_Config/Libraries/AceGUI-3.0-SharedMediaWidgets/prototypes.lua @@ -16,6 +16,11 @@ local Media = LibStub("LibSharedMedia-3.0") AGSMW = AGSMW or {} +local next, ipairs = next, ipairs +local tinsert, tremove = table.insert, table.remove + +local GetScreenHeight = GetScreenHeight + AceGUIWidgetLSMlists = { ['font'] = Media:HashTable("font"), ['sound'] = Media:HashTable("sound"), @@ -156,8 +161,8 @@ do insets = { left = 11, right = 12, top = 12, bottom = 9 }, } - local function OnMouseWheel(self, dir) - self.slider:SetValue(self.slider:GetValue()+(15*dir*-1)) + local function OnMouseWheel() + this.slider:SetValue(this.slider:GetValue()+(15*arg1*-1)) end local function AddFrame(self, frame) @@ -166,20 +171,19 @@ do frame:SetFrameLevel(self:GetFrameLevel() + 100) if next(self.contentRepo) then - frame:SetPoint("TOPLEFT", self.contentRepo[#self.contentRepo], "BOTTOMLEFT", 0, 0) + frame:SetPoint("TOPLEFT", self.contentRepo[getn(self.contentRepo)], "BOTTOMLEFT", 0, 0) frame:SetPoint("RIGHT", self.contentframe, "RIGHT", 0, 0) self.contentframe:SetHeight(self.contentframe:GetHeight() + frame:GetHeight()) - self.contentRepo[#self.contentRepo+1] = frame else self.contentframe:SetHeight(frame:GetHeight()) frame:SetPoint("TOPLEFT", self.contentframe, "TOPLEFT", 0, 0) frame:SetPoint("RIGHT", self.contentframe, "RIGHT", 0, 0) - self.contentRepo[1] = frame end + tinsert(self.contentRepo, frame) - if self.contentframe:GetHeight() > UIParent:GetHeight()*2/5 - 20 then + if self.contentframe:GetHeight() > GetScreenHeight()*2/5 - 20 then self.scrollframe:SetPoint("BOTTOMRIGHT", self, "BOTTOMRIGHT", -28, 12) - self:SetHeight(UIParent:GetHeight()*2/5) + self:SetHeight(GetScreenHeight()*2/5) self.slider:Show() self:SetScript("OnMouseWheel", OnMouseWheel) self.scrollframe:UpdateScrollChildRect() @@ -202,15 +206,15 @@ do end end - local function slider_OnValueChanged(self, value) - self.frame.scrollframe:SetVerticalScroll(value) + local function slider_OnValueChanged() + this.frame.scrollframe:SetVerticalScroll(arg1) end local DropDownCache = {} function AGSMW:GetDropDownFrame() local frame if next(DropDownCache) then - frame = table.remove(DropDownCache) + frame = tremove(DropDownCache) else frame = CreateFrame("Frame", nil, UIParent) frame:SetClampedToScreen(true) @@ -255,7 +259,7 @@ do slider:SetScript("OnValueChanged", slider_OnValueChanged) frame.slider = slider end - frame:SetHeight(UIParent:GetHeight()*2/5) + frame:SetHeight(GetScreenHeight()*2/5) frame.slider:SetValue(0) frame:Show() return frame @@ -267,7 +271,7 @@ do frame:Hide() frame:SetBackdrop(frameBackdrop) frame.bgTex:SetTexture(nil) - table.insert(DropDownCache, frame) + tinsert(DropDownCache, frame) return nil end end diff --git a/ElvUI_Config/Libraries/AceGUI-3.0/AceGUI-3.0.lua b/ElvUI_Config/Libraries/AceGUI-3.0/AceGUI-3.0.lua index 9c2655e..a7dce04 100644 --- a/ElvUI_Config/Libraries/AceGUI-3.0/AceGUI-3.0.lua +++ b/ElvUI_Config/Libraries/AceGUI-3.0/AceGUI-3.0.lua @@ -31,8 +31,9 @@ local AceGUI, oldminor = LibStub:NewLibrary(ACEGUI_MAJOR, ACEGUI_MINOR) if not AceGUI then return end -- No upgrade needed -- Lua APIs -local tconcat, tremove, tinsert = table.concat, table.remove, table.insert -local select, pairs, next, type = select, pairs, next, type +local tconcat, tremove, tinsert, getn = table.concat, table.remove, table.insert, table.getn +local format, gsub, upper = string.format, string.gsub, string.upper +local pairs, next, type, unpack = pairs, next, type, unpack local error, assert, loadstring = error, assert, loadstring local setmetatable, rawget, rawset = setmetatable, rawget, rawset local math_max = math.max @@ -68,14 +69,14 @@ end local function CreateDispatcher(argCount) local code = [[ - local xpcall, eh = ... + local xpcall, eh = xpcall, function(err) return geterrorhandler()(err) end local method, ARGS local function call() return method(ARGS) end local function dispatch(func, ...) method = func if not method then return end - ARGS = ... + ARGS = unpack(arg) return xpcall(call, eh) end @@ -84,7 +85,7 @@ local function CreateDispatcher(argCount) local ARGS = {} for i = 1, argCount do ARGS[i] = "arg"..i end - code = code:gsub("ARGS", tconcat(ARGS, ", ")) + code = gsub(code, "ARGS", tconcat(ARGS, ", ")) return assert(loadstring(code, "safecall Dispatcher["..argCount.."]"))(xpcall, errorhandler) end @@ -98,7 +99,7 @@ Dispatchers[0] = function(func) end local function safecall(func, ...) - return Dispatchers[select("#", ...)](func, ...) + return Dispatchers[getn(arg)](func, unpack(arg)) end -- Recycling functions @@ -158,6 +159,18 @@ do end +local function fixlevels(parent) + local child + local childList = {parent:GetChildren()} + local level = parent:GetFrameLevel() + 1 + + for i = 1, getn(childList) do + child = childList[i] + child:SetFrameLevel(level) + fixlevels(child) + end +end + ------------------- -- API Functions -- ------------------- @@ -189,7 +202,7 @@ function AceGUI:Create(type) if widget.OnAcquire then widget:OnAcquire() else - error(("Widget type %s doesn't supply an OnAcquire Function"):format(type)) + error(format("Widget type %s doesn't supply an OnAcquire Function", type)) end -- Set the default Layout ("List") safecall(widget.SetLayout, widget, "List") @@ -211,7 +224,7 @@ function AceGUI:Release(widget) if widget.OnRelease then widget:OnRelease() -- else --- error(("Widget type %s doesn't supply an OnRelease Function"):format(widget.type)) +-- error(format("Widget type %s doesn't supply an OnRelease Function", widget.type)) end for k in pairs(widget.userdata) do widget.userdata[k] = nil @@ -301,6 +314,7 @@ do frame:SetParent(nil) frame:SetParent(parent.content) self.parent = parent + fixlevels(frame) end WidgetBase.SetCallback = function(self, name, func) @@ -311,7 +325,7 @@ do WidgetBase.Fire = function(self, name, ...) if self.events[name] then - local success, ret = safecall(self.events[name], self, name, ...) + local success, ret = safecall(self.events[name], self, name, unpack(arg)) if success then return ret end @@ -363,7 +377,7 @@ do end WidgetBase.SetPoint = function(self, ...) - return self.frame:SetPoint(...) + return self.frame:SetPoint(unpack(arg)) end WidgetBase.ClearAllPoints = function(self) @@ -375,7 +389,7 @@ do end WidgetBase.GetPoint = function(self, ...) - return self.frame:GetPoint(...) + return self.frame:GetPoint(unpack(arg)) end WidgetBase.GetUserDataTable = function(self) @@ -463,8 +477,8 @@ do end WidgetContainerBase.AddChildren = function(self, ...) - for i = 1, select("#", ...) do - local child = select(i, ...) + for i = 1, getn(arg) do + local child = arg[i] tinsert(self.children, child) child:SetParent(self) child.frame:Show() @@ -474,9 +488,20 @@ do WidgetContainerBase.ReleaseChildren = function(self) local children = self.children - for i = 1,#children do - AceGUI:Release(children[i]) - children[i] = nil + for i = 1,getn(children) do + AceGUI:Release(tremove(children)) + end + end + + WidgetContainerBase.SetParent = function(self, parent) + WidgetBase.SetParent(self, parent) + + local level = self.frame:GetFrameLevel() + self.content:SetFrameLevel(level + 1) + local children = self.children + for i = 1,getn(children) do + local child = children[i] + child:SetParent(self) end end @@ -492,7 +517,7 @@ do end end - local function FrameResize(this) + local function FrameResize() local self = this.obj if this:GetWidth() and this:GetHeight() then if self.OnWidthSet then @@ -504,7 +529,7 @@ do end end - local function ContentResize(this) + local function ContentResize() if this:GetWidth() and this:GetHeight() then this.width = this:GetWidth() this.height = this:GetHeight() @@ -573,7 +598,7 @@ end function AceGUI:RegisterLayout(Name, LayoutFunc) assert(type(LayoutFunc) == "function") if type(Name) == "string" then - Name = Name:upper() + Name = upper(Name) end LayoutRegistry[Name] = LayoutFunc end @@ -582,7 +607,7 @@ end -- @param Name The name of the layout function AceGUI:GetLayout(Name) if type(Name) == "string" then - Name = Name:upper() + Name = upper(Name) end return LayoutRegistry[Name] end @@ -629,7 +654,7 @@ AceGUI:RegisterLayout("List", function(content, children) local height = 0 local width = content.width or content:GetWidth() or 0 - for i = 1, #children do + for i = 1, getn(children) do local child = children[i] local frame = child.frame @@ -676,7 +701,7 @@ AceGUI:RegisterLayout("Fill", local layoutrecursionblock = nil local function safelayoutcall(object, func, ...) layoutrecursionblock = true - object[func](object, ...) + object[func](object, unpack(arg)) layoutrecursionblock = nil end @@ -703,7 +728,7 @@ AceGUI:RegisterLayout("Flow", local frameoffset local lastframeoffset local oversize - for i = 1, #children do + for i = 1, getn(children) do local child = children[i] oversize = nil local frame = child.frame diff --git a/ElvUI_Config/Libraries/AceGUI-3.0/AceGUI-3.0.xml b/ElvUI_Config/Libraries/AceGUI-3.0/AceGUI-3.0.xml index 843a3dc..0419ee2 100644 --- a/ElvUI_Config/Libraries/AceGUI-3.0/AceGUI-3.0.xml +++ b/ElvUI_Config/Libraries/AceGUI-3.0/AceGUI-3.0.xml @@ -1,29 +1,4 @@