Suggestion: multiple buttons per skin?


08-12-2007 17:02:33

Since I am also using quickGUI for my bachelor's thesis application, I am currently considered with the following situation:


As you can see, I got several types of buttons.
Currently this means for each button I need a new skin. (except for new, load and add - just using setText here...)
(and I guess I'll do it this way since time keeps running ^^ )
But for future projects I guess it could be helpful if you are able to create multiple button images for one skin?


08-12-2007 20:53:40

Its been brought up, and I would like to support it, but I can't think of a good way to do so. I will try to think of a good way in the background, while I work on current stuff.

One thing you could try:

Make a skin with the following extra images:


And in code:


This should allow what you want.


09-12-2007 16:08:12

I'll give it a try, thanks!

It works perfectly :)
In case anybody else needs this, you need a


after the saveButton->setSkinComponent(".button.minus");, otherwise the old texture gets displayed until you mouse-over the button.
(redraw didn't help)


10-12-2007 21:10:15

I will look into the redraw function when I get a chance, it would be more intuitive if it did update correctly.