Jump to content
  • Advertisement
Sign in to follow this  
QuinnJohns

Creating a UI: Tabs - Help? Suggestions?

This topic is 3809 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 starting to create my own UI system, and am curious as to how to accomplish a tabbed system such as used, by alfith, using direct3d/C++. Example: http://members.gamedev.net/alfith/imagesDDream/alfEdit_006.jpg I've had success doing texboxes, listboxes, check boxes, radio, labels, buttons. Anyone have any tutorials or sample code how to produce such a tab control? I asked alfith, but he is using GTK, from what he told me. I do appreciate any insight anyone can provide me. Thank you~ Quinn

Share this post


Link to post
Share on other sites
Advertisement
Well, it seems easy to me. The tabs are just buttons which hide and show child widgets. Each of those child widgets has the same size, and each contains different controls. So assuming your interface system supports multiple levels of children and parents, you should be able to pull this off pretty easily.

Share this post


Link to post
Share on other sites
So, in turn, so I would just have multiple instances of listboxes, just making the one prompted by the button press visble? or a singlelistbox that populates everything, for each button? - is one option more phesible than the other?

Share this post


Link to post
Share on other sites
It wouldn't really make sense to have a single list box that changes its contents. Presumably, you want a tab control that you can display anything on. Have a tab page control, which contains other controls. The tab control will have a list of these, as well as a pointer to the currently active one. Whenever a tab button is changed, the current tab page is hidden, and the new tab page is shown, along with all of its controls.

Share this post


Link to post
Share on other sites
Yeah, I don't think I was thinking when I posted that comment. I am beginning to understand it a lot better. Once I get to coding it, I'll come back and bug people about it more, for the sake of optimization, etc.

Once again, thanks everyone for the help.

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!