mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-14 07:21:51 +00:00
worlds menu added
This commit is contained in:
parent
e70d30b9a2
commit
58d2637e9d
10 changed files with 28 additions and 2 deletions
|
|
@ -1,7 +1,7 @@
|
|||
<panel size='400' color='0' interval='1' context='menu'>
|
||||
<button onclick='menu.page="worlds"'>@Worlds</button>
|
||||
<button onclick='menu.page="new_world"'>@New World</button>
|
||||
<panel id='worlds' size='390,1' padding='5' color='#FFFFFF11' max-length='400'>
|
||||
</panel>
|
||||
<label padding='5'></label>
|
||||
<button onclick='menu.page="settings"'>@Settings</button>
|
||||
<button onclick='menu.page="content_menu"'>@Contents Menu</button>
|
||||
<button onclick='core.quit()'>@Quit</button>
|
||||
|
|
|
|||
6
res/layouts/pages/worlds.xml
Normal file
6
res/layouts/pages/worlds.xml
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
<panel size='400' color='0' interval='1' context='menu'>
|
||||
<panel id='worlds' size='390,1' padding='5' color='#FFFFFF11' max-length='400'>
|
||||
</panel>
|
||||
<button pos='485,525' size='500,40' onclick='core.open_folder("user:worlds")'>@Open worlds folder</button>
|
||||
<button onclick='menu:back()'>@Back</button>
|
||||
</panel>
|
||||
6
res/layouts/pages/worlds.xml.lua
Normal file
6
res/layouts/pages/worlds.xml.lua
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
function on_open()
|
||||
local worlds = world.get_list()
|
||||
for _, info in ipairs(worlds) do
|
||||
document.worlds:add(gui.template("world", info))
|
||||
end
|
||||
end
|
||||
Loading…
Add table
Add a link
Reference in a new issue