add refresh button to scripts page

This commit is contained in:
MihailRis 2025-01-06 13:08:42 +03:00
parent b5a266e1c1
commit da471bd4eb
2 changed files with 9 additions and 4 deletions

View File

@ -1,6 +1,11 @@
<panel size='400' color='0' context='menu'>
<label>@Scripts</label>
<panel id="list" size='400' interval='1' color='#00000030' max-length='300'>
<panel size='400' color='#00000030' context='menu'>
<container size='400,32'>
<label pos='2,10'>@Scripts</label>
<image onclick='refresh()' interactive='true' src='gui/refresh'
size='32' gravity='top-right'
color='#FFFFFF80' hover-color='#FFFFFF10'/>
</container>
<panel id="list" size='400' interval='1' color='0' max-length='300'>
<!-- content is generated in script -->
</panel>
<button onclick='menu:back()'>@Back</button>

View File

@ -10,7 +10,7 @@ function run_script(path)
start_coroutine(chunk, path)
end
local function refresh()
function refresh()
document.list:clear()
local available = pack.get_available()