Difference between revisions of "love.event.push"
(love.event uses Variant, and doesn't accept all types) |
|||
Line 7: | Line 7: | ||
=== Arguments === | === Arguments === | ||
{{param|Event|e|The name of the event.}} | {{param|Event|e|The name of the event.}} | ||
− | {{param| | + | {{param|Variant|a (nil)|First event argument.}} |
− | {{param| | + | {{param|Variant|b (nil)|Second event argument.}} |
− | {{param| | + | {{param|Variant|c (nil)|Third event argument.}} |
{{New_feature|0.8.0| | {{New_feature|0.8.0| | ||
− | {{param| | + | {{param|Variant|d (nil)|Fourth event argument.}} |
|080}} | |080}} | ||
=== Returns === | === Returns === |
Revision as of 11:13, 31 January 2017
Adds an event to the event queue.
Contents
Function
Synopsis
love.event.push( e, a, b, c, d )
Arguments
Event e
- The name of the event.
Variant a (nil)
- First event argument.
Variant b (nil)
- Second event argument.
Variant c (nil)
- Third event argument.
Available since LÖVE 0.8.0
Variant d (nil)
- Fourth event argument.
Returns
Nothing.
Examples
Quitting a game in 0.8.0
function love.keypressed(k)
if k == 'escape' then
love.event.push('quit') -- Quit the game.
end
end
Quitting a game in 0.7.2
function love.keypressed(k)
if k == 'escape' then
love.event.push('q') -- Quit the game.
end
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