Sign in to follow this  
Anddos

drag and drop menus

Recommended Posts

your gonna need to be more specific then that!

are you asking how to check if the item your dropping has been dragged outside the menu window?
Then yes, you could simply do a position check when you drop your item.
If it's outside the window then it will return a boolean to that specific item and handle it accordingly. (i.e. remove the item from an array in the menu)

But thats just one way to do it, it all depends on the menu your making and the effect you want to achieve

Share this post


Link to post
Share on other sites

I would go for distance rather than rect. you might be intersecting two or more possible drop targets.

 

Just take the distance from current drag location at the time of release to the potential drop targets, and snap to the closest target if it beats the threshold check. if it doesn't, it snaps back to where it came from.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this