mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-10 21:41:50 +00:00
content panel xml (WIP)
This commit is contained in:
parent
fbc2cc5ce9
commit
1b5a1a5ae6
5 changed files with 44 additions and 19 deletions
17
res/layouts/pages/content.xml.lua
Normal file
17
res/layouts/pages/content.xml.lua
Normal 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
|
||||
Loading…
Add table
Add a link
Reference in a new issue