red = color.new(200,0,0)
blue = color.new(0,0,150)
black = color.new(0,0,0)
silver = color.new(120,120,120)

background = image.load("IMG/menu.png")

font1 = font.load("font1.pgf")
size=1
shadow = color.new ( 200 , 0 , 0 ) 

current = 1

while true do

pad = controls.read()

screen:clear()
background:blit(0,0)


if current == 1 then
screen.print( font1, 120,115, "Start Game" , size, blue,shadow)
screen.print( font1, 120,155, "Credits" , size, silver,shadow)
screen.print( font1, 120,195, "Exit" , size, silver,shadow)
end

if current == 2 then
screen.print( font1, 120,115, "Start Game" , size, silver,shadow)
screen.print( font1, 120,155, "Credits" , size, blue,shadow)
screen.print( font1, 120,195, "Exit" , size, silver,shadow)
end

if current == 3 then
screen.print( font1, 120,115, "Start Game" , size, silver,shadow)
screen.print( font1, 120,155, "Credits" , size, silver,shadow)
screen.print( font1, 120,195, "Exit" , size, blue,shadow)
end


if controls.press("up") then
current = current - 1
end

if controls.press("down") then
current = current + 1
end

     
    
if controls.cross() and current == 1 then
dofile("load.lua")
end

if controls.cross() and current == 2 then
dofile("script.lua")
end
        
if controls.cross() and current == 3 then
os.quit()
end
   
    
if current == 4 then
current = 1
end
if current == 0 then
current = 3
end

screen.waitvblankstart()
screen.flip()
end