clickable object?
clickable object?
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.
Re: clickable object?
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.
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.
My game called Hat Cat and the Obvious Crimes Against the Fundamental Laws of Physics is out now!
Re: clickable object?
oh okay, thank you
Re: clickable object?
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..
Who is online
Users browsing this forum: No registered users and 2 guests