love.touchreleased example ?

General discussion about LÖVE, Lua, game development, puns, and unicorns.
Post Reply
PGUp
Party member
Posts: 105
Joined: Fri Apr 21, 2017 9:17 am

love.touchreleased example ?

Post by PGUp »

Still a beginner.. kinda confused on how to use this.. can anyone give me an example ?
-
User avatar
erasio
Party member
Posts: 118
Joined: Wed Mar 15, 2017 8:52 am
Location: Germany

Re: love.touchreleased example ?

Post 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
User avatar
zorg
Party member
Posts: 3444
Joined: Thu Dec 13, 2012 2:55 pm
Location: Absurdistan, Hungary
Contact:

Re: love.touchreleased example ?

Post 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).
Me and my stuff :3True Neutral Aspirant. Why, yes, i do indeed enjoy sarcastically correcting others when they make the most blatant of spelling mistakes. No bullying or trolling the innocent tho.
Post Reply

Who is online

Users browsing this forum: No registered users and 225 guests