Jump to content
  • Advertisement
Sign in to follow this  
Anddos

drag and drop menus

This topic is 1818 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

How do you test drag and drop type menus in mmo's , is it just testing if a 2d point is inside a rect?

Share this post


Link to post
Share on other sites
Advertisement

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

How do you test drag and drop type menus in mmo's , is it just testing if a 2d point is inside a rect?

 

How are MMOs related to GUIs?

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
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!