Jump to content
  • Advertisement
Sign in to follow this  
nickwinters

Managing Gui Systems

This topic is 4859 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

I'm creating my gui elements, but am not sure how to design the gui manager. One idea is to just have a large linked list of all elements and cycle them each frame to check mouse overs and such, but there has to be a better way to do so. Any advice? Thanks. -Nick

Share this post


Link to post
Share on other sites
Advertisement
At least the "standard" way to do things is to make controls children of larger controls that group them together, like a form. And then you test for things like mouse over against the larger elements, which then test ofr mouse over of their smaller elements. It forms a tree of controls, basically a bounding volume tree in 2D.

This does take a little bit of work to do right though. Messages have to get passe dup and down the tree in a way that makes sense, and it is nice for the GUI system to be somewhat extendable. YMMV

Share this post


Link to post
Share on other sites
Yeah, if we follow the MSWindows method, then you could maintain a list of every Dialog, when you check a Dialog for whether a mouse event should be responded to it passes this down to its children.

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!