Is there a way to get event data when using event.listen()?
I'm trying to display "X" where the user touches the screen. It works with event.pull() as I can get all the necessary parameters to pass to the GPU component, however, this yields the computer.
while true do
local _, _, x, y = event.pull("touch")
gpu.set(x, y, "X")
end
Is there a way to do this in the background using event.listen()? Something along the lines of
event.listen("touch", mark)
function mark(e) --e being the event that was registered
_, _, x, y = e
gpu.set(x, y, "X")
end
You can post now and register later.
If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.
Is there a way to get event data when using event.listen()?
I'm trying to display "X" where the user touches the screen. It works with event.pull() as I can get all the necessary parameters to pass to the GPU component, however, this yields the computer.
Is there a way to do this in the background using event.listen()? Something along the lines of
Link to post
Share on other sites