Jump to content
  • Advertisement
Sign in to follow this  
Waaayoff

Question about GUI design?

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

The article i'm reading uses 9 textured quads for every single control in the GUI. 4 for the sides, 4 for the corners and 1 for the middle. That way he can use a control template like this:



And create custom sized controls without reduction in the quality.

Problem is, what if i have an app with hundreds of buttons (Like Blender -.-). The number of textured quads adds up.....

Is there a better solution? Or is this technique used often?

Share this post


Link to post
Share on other sites
Advertisement
Share it along instances of your Button. Create it before any button is created, put it in a boost::shared_ptr<>, and then each Button has shared_ptr<> to that texture.

Share this post


Link to post
Share on other sites
Most of the buttons you show here don't require 9 quads at all.

Just think about it a bit. How do you want to scale up your destroy button, radio buttons, check boxes (maybe you can this), scroll bar buttons (the small arrows) with the 9-quads-technique?
I'll help : NOHOW. Did you actually think about it?
The rest can be bigger, but for example sliders, scrollbars only need 3 quads.
Just think about it.

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!