Difference between revisions of "love.quit"

(added example usage)
Line 11: Line 11:
 
=== Returns ===
 
=== Returns ===
 
{{param|boolean|r|Abort quitting. If true, do not close the game.}}
 
{{param|boolean|r|Abort quitting. If true, do not close the game.}}
 +
== Example ==
 +
<source lang="lua">
 +
function love.quit()
 +
  print("Thanks for playing. Please play again soon!")
 +
end
 +
</source>
 
== See Also ==
 
== See Also ==
 
* [[parent::love]]
 
* [[parent::love]]

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()
  print("Thanks for playing. Please play again soon!")
end

See Also

Other Languages