gui/GuiManager/Misc/GetAllChildren.int
Ryan Ward 76fd457833 Updated to 9.0.0
Love2D 1.11 Support is here! :D
2018-06-09 14:54:54 -04:00

25 lines
497 B
Plaintext

function gui:GetAllChildren()
local Stuff = {}
function Seek(Items)
for i=1,#Items do
if Items[i].Visible==true then
table.insert(Stuff,Items[i])
local NItems = Items[i]:getChildren()
if NItems ~= nil then
Seek(NItems)
end
end
end
end
local Objs = self:getChildren()
for i=1,#Objs do
if Objs[i].Visible==true then
table.insert(Stuff,Objs[i])
local Items = Objs[i]:getChildren()
if Items ~= nil then
Seek(Items)
end
end
end
return Stuff
end