You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
56 lines
1.2 KiB
56 lines
1.2 KiB
12 years ago
|
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
|
||
13 years ago
|
end
|
||
12 years ago
|
end
|
||
|
|
||
|
function drawDebugBoxes(enable)
|
||
|
if enable == nil then enable = true end
|
||
|
g_ui.setDebugBoxesDrawing(enable)
|
||
|
end
|
||
12 years ago
|
|
||
12 years ago
|
function hideMap()
|
||
|
local map = rootWidget:recursiveGetChildById('gameMapPanel')
|
||
|
if map then map:hide() end
|
||
|
end
|
||
|
|
||
|
function showMap()
|
||
|
local map = rootWidget:recursiveGetChildById('gameMapPanel')
|
||
|
if map then map:show() end
|
||
|
end
|
||
|
|
||
12 years ago
|
function debugContainersItems()
|
||
|
function UIItem:onHoverChange(hovered)
|
||
|
if hovered then
|
||
12 years ago
|
local item = self:getItem()
|
||
|
if item then ToolTip.display(item:getId()) end
|
||
12 years ago
|
else
|
||
|
ToolTip.hide()
|
||
|
end
|
||
|
end
|
||
12 years ago
|
end
|
||
12 years ago
|
|
||
|
function quit()
|
||
|
exit()
|
||
12 years ago
|
end
|
||
12 years ago
|
|
||
|
function autoReloadModule(name)
|
||
|
local function reloadEvent()
|
||
|
reloadModule(name)
|
||
|
scheduleEvent(reloadEvent, 1000)
|
||
|
end
|
||
|
reloadEvent()
|
||
|
end
|
||
|
|