zxmatzx
Advanced OT User
Hello,
Im developing a module to the OTC, and i need a treeView component. Something like:
OTC have a component like this? I tryed puting a TextList inside another, but don't worked.
The result is:
The .otui settings:
Any help will be welcome. Where can i check all components avaliable in OTC? The lack of documentation turns the things really hard...
Im developing a module to the OTC, and i need a treeView component. Something like:
OTC have a component like this? I tryed puting a TextList inside another, but don't worked.
Lua:
for k, v in pairs(groups) do --Get groups
local tmpGroup = g_ui.createWidget('GroupListWidget', groupsList) --create a GroupListWidget(TextList) in groupsList(TextList)
tmpGroup:setText(v) --Set the group name
for i = 1, math.random(5, 10) do --Get some random values
local tmp = g_ui.createWidget('MonsterWidget', tmpGroup) --create a MonsterWidget(Label) in tmpGroup(TextList)
tmp:setText(math.random(1, 100)) --Put some random text in MonsterWidget(Label)
end
end
The .otui settings:
Code:
TextList
id: groupsList
size: 230 100
anchors.top: parent.top
anchors.left: parent.left
anchors.bottom: parent.bottom
anchors.right: parent.right
margin-top: 2
margin-left: 2
margin-right: 2
margin-bottom: 2
GroupListWidget < TextList
margin-left: 2
margin-right: 2
margin-bottom: 1
margin-top: 1
MonsterWidget < Label
font: verdana-11px-monochrome
background-color: alpha
text-offset: 42 3
focusable: true
Attachments
-
1591455354635.png5.8 KB · Views: 20 · VirusTotal