What is best way to change look of button

Forum for general chit-chat or off-topic discussion.

Moderators: CEGUI MVP, CEGUI Team

daves
Home away from home
Home away from home
Posts: 253
Joined: Thu Feb 02, 2006 20:12

What is best way to change look of button

Postby daves » Thu May 10, 2007 13:10

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?

Pompei2
Home away from home
Home away from home
Posts: 489
Joined: Tue May 23, 2006 16:31

Postby Pompei2 » Fri May 11, 2007 13:23

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.

User avatar
Evak
Not too shy to talk
Not too shy to talk
Posts: 32
Joined: Mon Apr 17, 2006 05:29
Contact:

Postby Evak » Mon May 14, 2007 02:11

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.

Pompei2
Home away from home
Home away from home
Posts: 489
Joined: Tue May 23, 2006 16:31

Postby Pompei2 » Thu May 17, 2007 13:39

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).

daves
Home away from home
Home away from home
Posts: 253
Joined: Thu Feb 02, 2006 20:12

Postby daves » Fri May 18, 2007 12:44

Thanks all. I'll be putting a co-op on this task for the summer. Will let you know the approach we take.

daves
Home away from home
Home away from home
Posts: 253
Joined: Thu Feb 02, 2006 20:12

Postby daves » Fri May 18, 2007 12:49

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.

Pompei2
Home away from home
Home away from home
Posts: 489
Joined: Tue May 23, 2006 16:31

Postby Pompei2 » Sun May 20, 2007 13:18

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 ?


Return to “Offtopic Discussion”

Who is online

Users browsing this forum: No registered users and 6 guests