Difference between revisions of "love.quit"

(added example usage)
m
Line 14: Line 14:
 
<source lang="lua">
 
<source lang="lua">
 
function love.quit()
 
function love.quit()
 +
  --This will be printed to the console on quit
 
   print("Thanks for playing. Please play again soon!")
 
   print("Thanks for playing. Please play again soon!")
 
end
 
end

Revision as of 20:19, 14 November 2010

Available since LÖVE 0.7.0
It is not supported in earlier versions.


Callback function triggered when the game is closed.

Function

Synopsis

r = love.quit()

Arguments

None.

Returns

boolean r
Abort quitting. If true, do not close the game.

Example

function love.quit()
  --This will be printed to the console on quit
  print("Thanks for playing. Please play again soon!")
end

See Also

Other Languages