2 buttons with different images

For help with anything that CEGUI doesn't offer straight out-of-the-box, e.g.:
- Implementation of new features, such as new Core classes, widgets, WindowRenderers, etc. ...
- Modification of any existing features for specific purposes
- Integration of CEGUI in new engines or frameworks and writing of new plugins (Renderer, Parser, ...) or modules

Moderators: CEGUI MVP, CEGUI Team

User avatar
Sachin
Just popping in
Just popping in
Posts: 20
Joined: Wed Jul 06, 2005 09:42

2 buttons with different images

Postby Sachin » Wed Jul 06, 2005 14:16

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.

User avatar
lindquist
CEGUI Team (Retired)
Posts: 770
Joined: Mon Jan 24, 2005 21:20
Location: Copenhagen, Denmark

Re: 2 buttons with different images

Postby lindquist » Wed Jul 06, 2005 15:05

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

User avatar
Acrion
Just popping in
Just popping in
Posts: 18
Joined: Tue Jun 28, 2005 18:45
Location: Maine, USA
Contact:

Re: 2 buttons with different images

Postby Acrion » Wed Jul 06, 2005 18:02

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.
[font=Verdana][size=xx-small]"It's not hard to stand out when the general level of competence is so low" -EMH[/size][/font]
namik@flashmail.com


Return to “Modifications / Integrations / Customisations”

Who is online

Users browsing this forum: No registered users and 8 guests