System.usbDiskModeActivate()
-- Start Screen
background=Image.load( "background.png" )
while true do
screen:blit(0, 0, background, 0, 0, background:width(), background:height(), false)
screen.waitVblankStart()
screen.flip()
pad = Controls.read()
if pad:start() then
break
end
end
-- menu
red = Color.new(255,0,0)
black = Color.new(0,0,0)
white = Color.new(255,255,255)
menustatus = 1
while true do
screen:clear(black)
pad = Controls.read()
if pad:up() then
menustatus = menustatus - 1
screen.waitVblankStart(4)
end
if pad:down() then
menustatus = menustatus + 1
screen.waitVblankStart(4)
end
color={white, white, white}
color[menustatus]=red
screen:print(50, 50, "Play", color[1])
screen:print(50,60, "Credits", color[2])
screen:print(50,70, "Option", color[3])
if menustatus == 1 then
if pad:cross() then
dofile("game.lua")
end
end
if menustatus == 2 then
if pad:cross() then
dofile("Credit.lua")
end
end
if menustatus == 3 then
if pad:cross() then
end
if menustatus <= 0 then
menustatus = 3
end
end
if menustatus >= 4 then
menustatus = 1
end
screen.flip()
screen.waitVblankStart()
Controls.read()
end