Posted 21 October 2012 - 02:44 AM
code
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()
end
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}
screen:print(50, 50, "Play", color[1])
screen:print(50,60,"Options", color[2])
screen:print(50,70,"Exit", color[3])
color[menustatus]=red
if menustatus == 1 then
if pad:cross() then
dofile("Game.lua")
if menustatus == 2 then
if pad:cross() then
–insert options here
end
end
if menustatus == 3 then
if pad:cross() then
while true do
break
end
end
if menustatus <= 0 then
menustatus = 3
end
if menustatus >= 4 then
menustatus = 1
end
screen.flip()
screen.waitVblankStart()
end
end
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()
end
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}
screen:print(50, 50, "Play", color[1])
screen:print(50,60,"Options", color[2])
screen:print(50,70,"Exit", color[3])
color[menustatus]=red
if menustatus == 1 then
if pad:cross() then
dofile("Game.lua")
if menustatus == 2 then
if pad:cross() then
–insert options here
end
end
if menustatus == 3 then
if pad:cross() then
while true do
break
end
end
if menustatus <= 0 then
menustatus = 3
end
if menustatus >= 4 then
menustatus = 1
end
screen.flip()
screen.waitVblankStart()
end
end