selectorY = 45
functs[ #functs+1 ] =
function(key)
if key == "up" then
if selectorY == 95 or selectorY == 145 then
selectorY = selectorY - 50
end
end
if key == "down" then
if selectorY < 145 then
selectorY = selectorY+50
end
end
end
view = "normal"
function love.keypressed(key)
titleKeys(key)
end
function titleKeys(key)
if key == "n" then
view = "map"
end
end
function love.draw()
if view == "map" then
love.graphics.print("WHAT, THE MAP IS OPEN!!!", 10, 10)
elseif view == "normal" then
love.graphics.print("Press the n key, babe.", 10, 10)
end
end
If this doesn't help you at all, sorry! But reading that forced me to go test it right away.
Helvetica: Thanks! Yes, that works just fine, and is what I wanted to do. It also fixes my selector problem so that works like I expect it to now. Still curious what was causing the bug with the other code, but the new code works great and finally hammers how passing arguments to functions work (I am, it seems, a very slow learner).