--******************************************************************
--********console grab-----scores menu script****************************
--******************************************************************

--Anonymous D
-- 07/2007

--variables

--for lines of text
a = 60

--***********define colours
red = Color.new(255, 0, 0)
green = Color.new(0, 255, 0)
blue = Color.new(0, 0, 255)
pink = Color.new(180, 0, 180)
white = Color.new(255, 255, 255)

--*****load materials***********
--****************************

--************SOUNDS
--menu loop
--menu_loop = Sound.load("menu_loop.wav",true)

--open text file
file = io.open("scores.txt","r")

--read scores file and arrange in lines
line1 = file:read()

--background
background = Image.load("scrbgrnd.jpg")

--local sound = menu_loop
--voice = sound:play()

while true do

--draw in background
screen:blit(0,0,background)

--print score
screen:print(130,70,"Your last score:",white)
screen:print(290,70,line1,white)

--read pad input
pad = Controls.read()

--exit with triangle
if pad:triangle() then
background = nil
--voice:stop()
--menu_loop = nil
dofile("./index.lua")
break
end

--ending scripts
screen.waitVblankStart()
screen.flip()
end