menu = Image.load("img/background.png")
cursor = Image.load("img/cursor.png")


selected = 1  
maxselected = 3  
done = false  
oldpad = Controls.read() 

while done == false do


padmenu = Controls.read()

screen.waitVblankStart(6)

screen:blit(0, 0, menu, false)

if padmenu:up() and oldpad:up() ~= padmenu:up() then
selected = selected - 1
end

if padmenu:down() and oldpad:down() ~= padmenu:down() then
selected = selected + 1
end

if selected > maxselected then
selected = 1
elseif selected <= 0 then
selected = maxselected
end

if selected == 1 then
screen:blit(32, 120, cursor)
end

if selected == 2 then
screen:blit(32, 148, cursor)
end

if selected == 3 then
screen:blit(32, 178, cursor)
end

if padmenu:start() and oldpad:start() ~= padmenu:start() and selected == 1 then
dofile("standard.lua")
end

if padmenu:start() and oldpad:start() ~= padmenu:start() and selected == 2 then
dofile ("dropd.lua")
end

if padmenu:start() and oldpad:start() ~= padmenu:start() and selected == 3 then
dofile ("dropc.lua")
end

screen.flip()
oldpad = padmenu
end



