UI.Tree
From GiderosMobile
Available since: Gideros 2023.1
Class: UI
Description
Creates a Tree widget.
UI.Tree.new()
Example
local dataMapper=function(item)
if type(item)=="string" then
return item
else
return item.name,item.sub
end
end
local data = {
{ name="Root",
sub={
"A",
"B",
{ name="C",
sub={
"1",
{ name="2",
sub={"a","b"}
},
"3"}},
"D",
}
}
}
local gui = UI.Tree.new()
gui:setDimensions(96, 128)
gui:setColor(0x5c5c5c)
gui:setPosition(50, 50)
gui:setData(data, dataMapper)
local screen=UI.Screen.new()
screen:ui(gui)