mirror of
https://github.com/edubart/otclient.git
synced 2025-10-14 11:34:54 +02:00
add modulemanager module
This commit is contained in:
@@ -1,6 +1,17 @@
|
||||
function dumpWidgets()
|
||||
for i=1,rootWidget:getChildCount() do
|
||||
print(rootWidget:getChildByIndex(i):getId())
|
||||
function dumpWidgets(widget, level)
|
||||
widget = widget or rootWidget
|
||||
level = level or 0
|
||||
for i=1,widget:getChildCount() do
|
||||
local child = widget:getChildByIndex(i)
|
||||
if child:isVisible() then
|
||||
local name = child:getId()
|
||||
if name:match('widget%d+') == nil then
|
||||
print(string.rep(' ', level) .. name)
|
||||
end
|
||||
if child:getId() ~= 'terminalBuffer' then
|
||||
dumpWidgets(child, level+1)
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
|
Reference in New Issue
Block a user