- WIP: Treballant en el menu del joc i els objectes
This commit is contained in:
@@ -7,7 +7,8 @@ editor={
|
||||
|
||||
init=function()
|
||||
set_update(editor.update)
|
||||
editor.show_menu()
|
||||
--editor.show_menu()
|
||||
editor.new()
|
||||
end,
|
||||
|
||||
show_menu=function()
|
||||
|
||||
@@ -32,6 +32,14 @@ game={
|
||||
fade.fadein()
|
||||
end,
|
||||
|
||||
show_menu=function()
|
||||
menu.show({ {"GUARDAR PARTIDA", editor.new},
|
||||
{"CARREGAR PARTIDA", function() textbox.show("FILENAME TO LOAD:",editor.load, mapa.name) end},
|
||||
{"EIXIR", function() if mapa.name~=nil then editor.save(mapa.name) else textbox.show("FILENAME TO SAVE:",editor.save, mapa.name) end end},
|
||||
{"EXIT", main_init},
|
||||
}, function()editor.paused=false end)
|
||||
end,
|
||||
|
||||
update=function()
|
||||
local hero = actors.search("jailer")
|
||||
if hero then
|
||||
@@ -56,6 +64,8 @@ game={
|
||||
hero.path={pos=0,route='l',keys=true}
|
||||
elseif btn(KEY_RIGHT) then
|
||||
hero.path={pos=0,route='r',keys=true}
|
||||
elseif btnp(KEY_ESCAPE) then
|
||||
game.show_menu()
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@ function _init()
|
||||
setsource(tiles)
|
||||
local pal=loadpal("tiles.gif")
|
||||
setpal(pal)
|
||||
beat(6)
|
||||
beat(12)
|
||||
fade.init()
|
||||
main_init()
|
||||
end
|
||||
|
||||
@@ -13,10 +13,11 @@ menu = {
|
||||
end,
|
||||
|
||||
update=function()
|
||||
menu.old_update()
|
||||
--menu.old_update()
|
||||
|
||||
rectfill(10,20, 150, 34+#menu.options*10,6)
|
||||
rect(10,20, 150, 34+#menu.options*10,8)
|
||||
rect(9,19, 151, 35+#menu.options*10,6)
|
||||
|
||||
for i,v in ipairs(menu.options) do
|
||||
color(4) if menu.selected==i then color(15) prnt(">",20,20+i*10) end
|
||||
|
||||
BIN
data/objects.gif
Normal file
BIN
data/objects.gif
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 700 B |
Reference in New Issue
Block a user