Page 1 of 1

2 buttons with different images

Posted: Wed Jul 06, 2005 14:16
by Sachin
Hi

I m reletively new to CEGUI so need a lil help.

I basically want to create 2 different buttons, such that both have different images (each for normal, hover, pushed state). I have tried out that through the scheme & imageset files but to no avail. I'll be grateful if anyone cud give a solution.

Re: 2 buttons with different images

Posted: Wed Jul 06, 2005 15:05
by lindquist
PushButton has support for custom imagery.
Take a look here http://www.cegui.org.uk/api_reference/c ... utton.html for a list of the PushButton functions.

The ones you're interested in are: get/setHoverImage etc.
and setCustomImageryEnabled and ...AutoSized

Maybe you don't want the standard imagery. Then setStandardImageryEnabled might be of interest too...

HTH
(I'm a little in a hurry, therefore the not-so-detailed reply...)

Re: 2 buttons with different images

Posted: Wed Jul 06, 2005 18:02
by Acrion
Please see my post:

http://www.cegui.org.uk/modules/newbb/v ... umpost4673

The example is by Lua Script but it shows you how it can be done on a per button basis.

You could always subclass and create default images in the const section as well.

How this helps.