Page 1 of 1

clickable object?

Posted: Mon Jun 15, 2015 5:26 pm
by Smooth203
Hello, I'm very new to this and I was wondering how I would create and object on screen that would not be able to pass through and it, when clicked on, open up a menu or something like that. Thanks. :nyu:

Re: clickable object?

Posted: Wed Jun 17, 2015 5:46 pm
by T-Bone
I don't understand the part about not being able to pass through, but to make objects "clickable", well, there's no such concept built into Löve. What we typically do is to draw an object on screen, and keep track of where it is. Then when the user clicks, we check if the click was near or on the object in question, and if so do stuff. This approach allows great flexibility to how every aspect works.

This is fairly general for game development in Löve in general. It's not a game engine, it's a game framework. This gives you maximum freedom and control, but requires a bit more from the programmer to figure out how to make stuff work.

Re: clickable object?

Posted: Mon Jun 22, 2015 6:29 pm
by Smooth203
oh okay, thank you

Re: clickable object?

Posted: Mon Jun 22, 2015 8:35 pm
by Smooth203
what I meant by not passing through was the character not being able to, like, the way you can bind your character to the edge of the screen but not.. Sorry, I'm not very good with explaining.. :?