Page 1 of 1

love.touchreleased example ?

Posted: Mon Jun 26, 2017 11:34 am
by PGUp
Still a beginner.. kinda confused on how to use this.. can anyone give me an example ?

Re: love.touchreleased example ?

Posted: Mon Jun 26, 2017 2:13 pm
by erasio
It's a callback like load, update and draw.

Code: Select all

function love.touchreleased( id, x, y, dx, dy, pressure )
    -- ToDo handle end of touch input
end

Re: love.touchreleased example ?

Posted: Mon Jun 26, 2017 5:14 pm
by zorg
You define it, usually along with the above, and love.touchpressed and love.touchmoved, in the "file scope", meaning outside of any other function.

And you write in things you want to do with the information they return when the user touches a screen, moves their finger(s) across while touching, and finally when releasing their finger(s).