mirror of
https://github.com/Bluewhale1337/ElvUIModernized.git
synced 2026-07-27 08:24:44 +00:00
getn(arg) -> arg.n
This commit is contained in:
@@ -99,7 +99,7 @@ Dispatchers[0] = function(func)
|
||||
end
|
||||
|
||||
local function safecall(func, ...)
|
||||
return Dispatchers[getn(arg)](func, unpack(arg))
|
||||
return Dispatchers[arg.n](func, unpack(arg))
|
||||
end
|
||||
|
||||
-- Recycling functions
|
||||
@@ -477,7 +477,7 @@ do
|
||||
end
|
||||
|
||||
WidgetContainerBase.AddChildren = function(self, ...)
|
||||
for i = 1, getn(arg) do
|
||||
for i = 1, arg.n do
|
||||
local child = arg[i]
|
||||
tinsert(self.children, child)
|
||||
child:SetParent(self)
|
||||
|
||||
@@ -167,7 +167,7 @@ local function FirstFrameUpdate()
|
||||
end
|
||||
|
||||
local function BuildUniqueValue(...)
|
||||
return tconcat(arg, "\001", 1, getn(arg))
|
||||
return tconcat(arg, "\001", 1, arg.n)
|
||||
end
|
||||
|
||||
--[[-----------------------------------------------------------------------------
|
||||
@@ -539,7 +539,7 @@ local methods = {
|
||||
self.filter = false
|
||||
local status = self.status or self.localstatus
|
||||
local groups = status.groups
|
||||
for i = 1, getn(arg) do
|
||||
for i = 1, arg.n do
|
||||
groups[tconcat(arg, "\001", 1, i)] = true
|
||||
end
|
||||
status.selected = uniquevalue
|
||||
|
||||
@@ -8,7 +8,6 @@ if not AceGUI or (AceGUI:GetWidgetVersion(Type) or 0) >= Version then return end
|
||||
-- Lua APIs
|
||||
local pairs = pairs
|
||||
local unpack = unpack
|
||||
local getn = table.getn
|
||||
|
||||
-- WoW APIs
|
||||
local PlaySound = PlaySound
|
||||
@@ -228,7 +227,7 @@ local methods = {
|
||||
image:SetTexture(path)
|
||||
|
||||
if image:GetTexture() then
|
||||
local n = getn(arg)
|
||||
local n = arg.n
|
||||
if n == 4 or n == 8 then
|
||||
image:SetTexCoord(unpack(arg))
|
||||
else
|
||||
|
||||
@@ -4,7 +4,6 @@ local AceGUI = LibStub("AceGUI-3.0")
|
||||
|
||||
-- Lua APIs
|
||||
local assert, unpack = assert, unpack
|
||||
local getn = table.getn
|
||||
|
||||
-- WoW APIs
|
||||
local PlaySound = PlaySound
|
||||
@@ -14,7 +13,7 @@ local function fixlevels(parent, ...)
|
||||
local child
|
||||
local level = parent:GetFrameLevel() + 1
|
||||
|
||||
for i = 1, getn(arg) do
|
||||
for i = 1, arg.n do
|
||||
child = arg[i]
|
||||
child:SetFrameLevel(level)
|
||||
fixlevels(child)
|
||||
@@ -25,7 +24,7 @@ local function fixstrata(strata, parent, ...)
|
||||
local child
|
||||
parent:SetFrameStrata(strata)
|
||||
|
||||
for i = 1, getn(arg) do
|
||||
for i = 1, arg.n do
|
||||
child = arg[i]
|
||||
fixstrata(strata, child)
|
||||
end
|
||||
|
||||
@@ -20,7 +20,7 @@ local function fixlevels(parent, ...)
|
||||
local child
|
||||
local level = parent:GetFrameLevel() + 1
|
||||
|
||||
for i = 1, getn(arg) do
|
||||
for i = 1, arg.n do
|
||||
child = arg[i]
|
||||
child:SetFrameLevel(level)
|
||||
fixlevels(child)
|
||||
@@ -31,7 +31,7 @@ local function fixstrata(strata, parent, ...)
|
||||
local child
|
||||
parent:SetFrameStrata(strata)
|
||||
|
||||
for i = 1, getn(arg) do
|
||||
for i = 1, arg.n do
|
||||
child = arg[i]
|
||||
fixstrata(strata, child)
|
||||
end
|
||||
|
||||
@@ -7,7 +7,6 @@ if not AceGUI or (AceGUI:GetWidgetVersion(Type) or 0) >= Version then return end
|
||||
|
||||
-- Lua APIs
|
||||
local pairs, print, unpack = pairs, print, unpack
|
||||
local getn = table.getn
|
||||
|
||||
-- WoW APIs
|
||||
local CreateFrame, UIParent = CreateFrame, UIParent
|
||||
@@ -59,7 +58,7 @@ local methods = {
|
||||
image:SetTexture(path)
|
||||
|
||||
if image:GetTexture() then
|
||||
local n = getn(arg)
|
||||
local n = arg.n
|
||||
if n == 4 or n == 8 then
|
||||
image:SetTexCoord(unpack(arg))
|
||||
else
|
||||
|
||||
@@ -7,7 +7,6 @@ if not AceGUI or (AceGUI:GetWidgetVersion(Type) or 0) >= Version then return end
|
||||
|
||||
-- Lua APIs
|
||||
local pairs, unpack = pairs, unpack
|
||||
local getn = table.getn
|
||||
|
||||
-- WoW APIs
|
||||
local CreateFrame, UIParent = CreateFrame, UIParent
|
||||
@@ -50,7 +49,7 @@ local methods = {
|
||||
end,
|
||||
|
||||
["SetHighlightTexCoord"] = function(self, ...)
|
||||
local c = getn(arg)
|
||||
local c = arg.n
|
||||
if c == 4 or c == 8 then
|
||||
self.highlight:SetTexCoord(unpack(arg))
|
||||
else
|
||||
|
||||
@@ -8,7 +8,6 @@ if not AceGUI or (AceGUI:GetWidgetVersion(Type) or 0) >= Version then return end
|
||||
|
||||
-- Lua APIs
|
||||
local max, pairs, unpack = math.max, pairs, unpack
|
||||
local getn = table.getn
|
||||
|
||||
-- WoW APIs
|
||||
local CreateFrame, UIParent = CreateFrame, UIParent
|
||||
@@ -112,7 +111,7 @@ local methods = {
|
||||
|
||||
if image:GetTexture() then
|
||||
self.imageshown = true
|
||||
local n = getn(arg)
|
||||
local n = arg.n
|
||||
if n == 4 or n == 8 then
|
||||
image:SetTexCoord(unpack(arg))
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user