love.event.poll

love.event.poll

Returns an iterator for messages in the event queue.

Function

Synopsis

i = love.event.poll( )

Arguments

None.

Returns

function i
Iterator function usable in a for loop.

Examples

Checking for events in 0.8.0

for e, a, b, c, d in love.event.poll() do
	if e == "quit" then
		-- Quit!
	end	
end

Checking for events in 0.7.2

for e, a, b, c in love.event.poll() do
	if e == "q" then
		-- Quit!
	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.poll

在线笔记
App下载
App下载

扫描二维码

下载编程狮App

公众号
微信公众号

编程狮公众号

意见反馈
返回顶部