test worlds panel with XML + lua

This commit is contained in:
MihailRis
2024-03-22 10:40:28 +03:00
parent 71f4dff32f
commit 9a817a86ff
10 changed files with 93 additions and 49 deletions
+15
View File
@@ -0,0 +1,15 @@
function on_open()
local worlds = core.get_worlds_list()
for _, name in ipairs(worlds) do
document.worlds:add(
"<container "..
"size='380,46' "..
"color='#0F1E2DB2' "..
"hover-color='#162B3399' "..
"onclick='core.open_world(\""..name.."\")'"..
">"..
"<label pos='8,8'>"..name.."</label>"..
"</container>"
)
end
end