content panel xml (WIP)

This commit is contained in:
MihailRis
2024-04-17 01:32:49 +03:00
parent fbc2cc5ce9
commit 1b5a1a5ae6
5 changed files with 44 additions and 19 deletions
+6
View File
@@ -0,0 +1,6 @@
<panel size='550' color='0' padding='8' interval='5'>
<panel id='packs_panel' size='540,10' color='0,0,0,50' max-length='400'>
<!-- content is generated in script -->
</panel>
<button onclick='menu:back()' padding='10'>@Back</button>
</panel>
+17
View File
@@ -0,0 +1,17 @@
function add_pack(packid, packinfo)
document.packs_panel:add(gui.template("pack", {
id=packid,
title=packinfo.title,
description=packinfo.description,
icon="gui/no_icon",
creator=packinfo.creator,
remover='0'
}))
end
function on_open()
local packs = pack.get_installed()
for i,id in ipairs(packs) do
add_pack(id, pack.get_info(id))
end
end