Managing Gui Systems

Started by
1 comment, last by d000hg 18 years, 9 months ago
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
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
Turring Machines are better than C++ any day ^_~
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.

This topic is closed to new replies.

Advertisement