Love:Mike: Added quit to title; Added quit from title; updated TODO; moved quit function into normal keypresses

This commit is contained in:
2017-08-10 15:14:39 -07:00
parent c39c652d3b
commit 4d68180116
3 changed files with 20 additions and 4 deletions

View File

@@ -3,7 +3,7 @@ Gamestates = {}
-- Title screen
function Gamestates.title_draw()
love.graphics.setColor(255,0,0)
love.graphics.print(string.format("Press space to start!"), screen.width/2, screen.height/2)
love.graphics.print(string.format("Press space to start!\n Or 'q' to exit."), screen.width/2, screen.height/2)
end
function Gamestates.title_update()
@@ -11,6 +11,10 @@ function Gamestates.title_update()
gamestate.draw = Gamestates.main_draw
gamestate.update = Gamestates.main_update
end
if love.keyboard.isDown(QUIT_KEY) then
love.event.quit()
end
end
-- Main game loop