-
Notifications
You must be signed in to change notification settings - Fork 73
Sdl pollEvent
Tangent 128 edited this page Mar 28, 2015
·
3 revisions
Use this function to poll for currently pending events. This function is implemented as an iterator.
function SDL.pollEvent()
- an iterator of event (see Event)
--
-- This is the recommended way of handling events
--
local running = true
while running do
for e in SDL.pollEvent() do
if e.type == SDL.event.Quit then
running = false
end
end
end