Love:Mike: Added quit to title; Added quit from title; updated TODO; moved quit function into normal keypresses
This commit is contained in:
		@@ -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
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user