Page 2 of 2

Re: Dragging an object/image, making it clickable

Posted: Sat Feb 04, 2012 8:46 am
by hryx
coffee wrote:You should add it to wiki snippets.
There's already a wiki tutorial page for mouse dragging. Though, it just contains a link to a blog entry on BlackBulletIV's website. Would it be useful to rework that wiki page?

Re: Dragging an object/image, making it clickable

Posted: Sat Feb 04, 2012 11:31 am
by coffee
hryx wrote:
coffee wrote:You should add it to wiki snippets.
There's already a wiki tutorial page for mouse dragging. Though, it just contains a link to a blog entry on BlackBulletIV's website. Would it be useful to rework that wiki page?
Hmm? Wiki snippets (https://love2d.org/wiki/Category:Snippets) not wiki tutorials. I just suggested add it because there isn't one of that kind and probably could help other people wanting to add some out-of-box easy drag-n-drop solution without have to mess with some other more complicated UI/GUI libraries from Wiki Libraries (https://love2d.org/wiki/Category:Libraries) or presented somewhere in forum.

Re: Dragging an object/image, making it clickable

Posted: Sat Feb 04, 2012 1:07 pm
by gignat
more informative stuff....hats off guys !!!

thanks Marekk for the detailed reply of the whole dividing getWidth and height. The square you drew gave me a "lightbulb above head" moment :))

otherwise, is great idea what coffee suggested. The whole community is what makes Love special, so we should extend the wiki site, in any way we can, so others can start easier.

The drag and drop idea for a snippet sounds superb

Re: Dragging an object/image, making it clickable

Posted: Sat Feb 04, 2012 1:19 pm
by hryx
I'd assumed that a tutorial on the topic would make snippets redundant, but I see your point. A quick blob of code in the reference would be handy for tasks you want to repeat often. I'll put together a simple one when I get up tomorrow. Probably a bit less generalized in style than MarekkPie's.

Re: Dragging an object/image, making it clickable

Posted: Sat Feb 04, 2012 5:29 pm
by MarekkPie
(pops collar) I'm all about the style.