love.event.push
love.event.push
Adds an event to the event queue.
Function
Synopsis
love.event.push( e, a, b, c, d )
Arguments
Event e
- The name of the event.
mixed a (nil)
- First event argument.
mixed b (nil)
- Second event argument.
mixed c (nil)
- Third event argument.
-
mixed d (nil)
Available since 0.8.0 - 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
© 2006–2016 LÖVE Development Team
Licensed under the GNU Free Documentation License, Version 1.3.
https://love2d.org/wiki/love.event.push