Page 1 of 1

What is best way to change look of button

Posted: Thu May 10, 2007 13:10
by daves
Currently we are using the windowslook. It suits us fairly well. The one problem that we've had is that we have a specific look in mind for a "control panel" of buttons. These buttons ought to behave like buttons but we want to be able to do the following things visually:

1] Change the background color of the button (can't seem to change the background color of a WindowsLook button)... looking for multiple greyscale levels.
2] Have more than one foreground text color for the text displayed on the button. So there may be three words in the button and each one might be a different color.

What is the easiest way to achieve something along these lines?

Posted: Fri May 11, 2007 13:23
by Pompei2
there is no easy way to achieve this :)
1] Read the two falagard skinning tutorials in the tutorials section and play around with it a bit.
2] Ifyou know the count of (max) different colors you could create a statictext for each different color, as (a) child(s) of the button. If not, take a look at this thread, and read the WHOLE thread.

Posted: Mon May 14, 2007 02:11
by Evak
I just copied the imagebutton from taharezlook to Windowslook, to enable me to create my own button styles. Not sure about the coloured text though.

Posted: Thu May 17, 2007 13:39
by Pompei2
if you decide to take ldb's approach for coloring the text, then in the looknfeel the textcolor would just be the default color (when no other is specified).

Posted: Fri May 18, 2007 12:44
by daves
Thanks all. I'll be putting a co-op on this task for the summer. Will let you know the approach we take.

Posted: Fri May 18, 2007 12:49
by daves
Pompei2 wrote:there is no easy way to achieve this :)
1] Read the two falagard skinning tutorials in the tutorials section and play around with it a bit.
2] Ifyou know the count of (max) different colors you could create a statictext for each different color, as (a) child(s) of the button. If not, take a look at this thread, and read the WHOLE thread.


In general we will know the "max" color. I'm thinking that a statictext for each color might make sense. I also think we will take a hard look at the skinning tutorials. I see this as a good opportunity for us to learn to make our own scheme.

I've glanced through the link that you provided. Do you think the ldb approach is a good one? Is it compatible with the direction that cegui is going? It certainly looks easy to use.

Posted: Sun May 20, 2007 13:18
by Pompei2
I don't know if it will be integrated in upcoming cegui versions, but i really hope so ! because this is kind of must-have in modern games :)

by the way, who puts the community patches into cegui ?