content panel xml (WIP)
This commit is contained in:
@@ -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>
|
||||
@@ -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
|
||||
@@ -1,15 +1,18 @@
|
||||
<container onclick='%{callback}' size='540,80' color='#0F1E2DB2'>
|
||||
<label pos='215,2' color='#FFFFFF80' size='300,25' align='right'>
|
||||
<label color='#FFFFFF80' size='300,25' align='right' gravity='top-right'>
|
||||
[%{id}]
|
||||
</label>
|
||||
<label pos='78,6'>%{title}</label>
|
||||
<label if='%{creator}' color='#CCFFE5B2' size='300,20' align='right' pos='215,60'>
|
||||
<label if='%{creator}' color='#CCFFE5B2' size='300,20' align='right'
|
||||
gravity='bottom-right'>
|
||||
%{creator}
|
||||
</label>
|
||||
<label pos='80,28' color='#FFFFFFB2'>
|
||||
%{description}
|
||||
</label>
|
||||
<button if='%{remover}' onclick='%{remover}' color='0' hover-color='#FFFFFF2B'>
|
||||
<button if='%{remover}' onclick='%{remover}' color='0' hover-color='#FFFFFF2B'
|
||||
gravity='center-right' margin='10'>
|
||||
<image src='gui/cross' size='32,32'/>
|
||||
</button>
|
||||
<image pos='8,8' src='%{icon}' size='64'></image>
|
||||
</container>
|
||||
|
||||
Reference in New Issue
Block a user