Available since LÖVE 0.6.0 |
This function is not supported in earlier versions. |
Adds an event to the event queue.
From 0.10.0 onwards, you may pass an arbitrary amount of arguments with this function, though the default callbacks don't ever use more than six.
love.event.push( n, a, b, c, d, e, f, ... )
Event n
Variant a (nil)
Variant b (nil)
Variant c (nil)
Variant d (nil)
Nothing.
function love.keypressed(k) if k == 'escape' then love.event.push('quit') -- Quit the game. end end
function love.keypressed(k) if k == 'escape' then love.event.push('q') -- Quit the game. end end