menu = nil
menu1 = nil
menu2 = nil
menu3 = nil
allumette = nil

--images
menu = Image.load("datas/menu.png")
niveau = Image.load("datas/niveau.png")
allumetteniveau = Image.load("datas/allumette1.png")
continuer = Image.load("datas/niveaumenu.png")

--sons
mback = Sound.load("datas/MenuBack.wav",false)
mnext = Sound.load("datas/MenuNext.wav",false)

--boucle principale

while true do

pad = Controls.read()
screen:clear()
screen:blit(0, 0, menu)
screen:blit(145, 100, niveau)
screen:blit(335, 70, allumetteniveau)
screen:blit(153, 230, continuer)

--jouer

if pad:cross() then
mnext:play()
screen:flip()
screen.waitVblankStart(20)
dofile "niveau1.lua"
break
end

if pad:triangle() then
mback:play()
screen:flip()
screen.waitVblankStart(20)
dofile "menu.lua"
break
end

screen:flip()
screen.waitVblankStart()
end 