Views
love.quit
Available since LÖVE 0.7.0 |
This callback 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
This example shows how the return value of love.quit can be used to stop the closing of the game.
local quit = true;
function love.quit()
if quit then
print('We are not ready to quit yet!');
quit = not quit;
else
print('Thanks for playing. Please play again soon!');
return quit;
end
return true;
end
function love.quit()
if quit then
print('We are not ready to quit yet!');
quit = not quit;
else
print('Thanks for playing. Please play again soon!');
return quit;
end
return true;
end
See Also
Other Languages
Dansk –
Deutsch –
English –
Español –
Français –
Indonesia –
Italiano –
Lietuviškai –
Magyar –
Nederlands –
Polski –
Português –
Română –
Slovenský –
Suomi –
Svenska –
Türkçe –
Česky –
Ελληνικά –
Български –
Русский –
Српски –
Українська –
עברית –
ไทย –
日本語 –
正體中文 –
简体中文 –
Tiếng Việt –
한국어
More info