Jump to content
  • Advertisement


This topic is now archived and is closed to further replies.


User Interface

This topic is 5713 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 am currently trying to add in a user interface system to my engine. I have the window drawing in place and have a system where by u can attach other windows as children etc etc. However, my problem is that when i move a bigger window over a smaller one and when the user clicks ontop of both windows, both receive messages. What i think i need is some kind of Z-Ordering. Here is the system i propose. -When a child is added to the main Interface class it is set onto the top of the stack and thus is the active one. -When a user clicks on my applications window the message is passed to the Interface class. This checks to see if the active window (top of the stack) is the window that gets it (if the mouse x and y are within the window). -If so, that window receives the message and the loop quits -If not, the loop continues until it finds a window that has been hit, this is then set as the active one (put to the top of the stack) -If no window is hit then the list remains the same. I can, in this case use this list of windows as the list that i use to draw my windows (i will get proper Z-Ordering). Does this seem like a good way to do it ? How would it be best to move windows to the top of the ''stack'' ? -Also, i dont want to be using 3rd party libraries such as GLUI.

Share this post

Link to post
Share on other sites

  • 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!