Page 1 of 1

Need example code for grab and drop object with mouse?

Posted: Wed Aug 09, 2017 9:50 am
by 012rev3
Hi guys!
I need example code for the mouse selection object. Can i do it and how?
I already searched but didn't found or i cant do it sory :(
Need to grab object with mouse and drop it where i want to...

Re: Need example code for grab and drop object with mouse?

Posted: Wed Aug 09, 2017 5:03 pm
by Xugro
You can look at the code of my video puzzle:
https://love2d.org/forums/viewtopic.php ... 9&p=207465

Re: Need example code for grab and drop object with mouse?

Posted: Wed Aug 09, 2017 6:32 pm
by 012rev3
No no sory for my english.
I mean grab object in the window screen and drop it. Example box object. I want select and grab box object with mouse in the window and change object location.

Look it please : https://jqueryui.com/droppable/

Re: Need example code for grab and drop object with mouse?

Posted: Thu Aug 10, 2017 7:50 pm
by Xugro
Here is an example code that does the same thing as your Javascript example. :)

Re: Need example code for grab and drop object with mouse?

Posted: Fri Aug 11, 2017 7:10 am
by 012rev3
Yes! Thank you so much. :)