Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --Other events
- function processEvents(event)
- if event[1] == "monitor_touch" then
- local xPos = event[3]
- local yPos = event[4]
- -- Check if it in a certain range and handle
- processTouchEvents(xPos, yPos)
- end
- end
- local function wait (time)
- local timer = os.startTimer(time)
- while true do
- local event = {os.pullEvent()}
- if (event[1] == "timer" and event[2] == timer) then
- break
- else
- processEvents(event) -- a custom function in which you would deal with received events
- end
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment