28 lines
666 B
Lua
28 lines
666 B
Lua
function outputChatBoxR(message)
|
|
return outputChatBox(message, 200, 250, 200)
|
|
end
|
|
|
|
-- dump the element tree
|
|
function map(element, level)
|
|
level = level or 0
|
|
element = element or root
|
|
local indent = string.rep(' ', level)
|
|
local eType = getElementType(element)
|
|
local eID = getElementID(element)
|
|
local eChildren = getElementChildren(element)
|
|
|
|
local tagStart = '<'..eType
|
|
if eID then
|
|
tagStart = tagStart..' id="'..eID..'"'
|
|
end
|
|
|
|
if #eChildren < 1 then
|
|
outputConsole(indent..tagStart..'"/>')
|
|
else
|
|
outputConsole(indent..tagStart..'">')
|
|
for k, child in ipairs(eChildren) do
|
|
map(child, level+1)
|
|
end
|
|
outputConsole(indent..'</'..eType..'>')
|
|
end
|
|
end
|