[Solved]Changing DisabledImage via layout?

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

Moderators: CEGUI MVP, CEGUI Team

ianstangoe
Quite a regular
Quite a regular
Posts: 79
Joined: Wed Jan 09, 2008 11:06

[Solved]Changing DisabledImage via layout?

Postby ianstangoe » Thu Jun 10, 2010 10:17

Hi,

Should setting the property 'DisabledImage' in the layout script work for changing the disabled button image?

It seems that it doesn't for us and we just get a default greyed out appearance :?

We checked in the layout editor and its having no effect on any of our own skins or the default TaharezLook skin.

Ian.
Last edited by ianstangoe on Thu Jun 10, 2010 13:14, edited 1 time in total.

User avatar
CrazyEddie
CEGUI Project Lead
Posts: 6760
Joined: Wed Jan 12, 2005 12:06
Location: England
Contact:

Re: Changing DisabledImage via layout?

Postby CrazyEddie » Thu Jun 10, 2010 12:10

I had a quick look in TaharezLook and it seems we're not drawing the image for the disabled state bur rather using the normal rendering section again and applying some colours - so that's why it's not showing up for TaharezLook - if you've based your own skins on what we do in there, then presumably you have the same issue.

The solution is either:
1) Create a new ImagerySection 'disabled', which is a copy of the ImagerySection 'normal' and replace the reference to "NormalImage" with "DisabledImage" and finally change the Section specification for the Disabled state from "normal" to "disabled".
- or -
2) Split the "normal" ImagerySection into two - one for the main imagery and the other for the custom Image (say "normal" and "normal_image"), add a new ImagerySection based off of the new "normal_image" that instead references the DisabaledImage and name the ImagerySection "disabled_image", add Section specifications to the Normal and Disabled states that reference the appropriate ImagerySection for the desired image, so "normal_image" and "disabled_image" respectively.

I'll fix our versions of these either tonight or some time tomorrow, thanks for bringing it up :)

HTH

CE

ianstangoe
Quite a regular
Quite a regular
Posts: 79
Joined: Wed Jan 09, 2008 11:06

Re: Changing DisabledImage via layout?

Postby ianstangoe » Thu Jun 10, 2010 12:54

Yes we based our skin on the TaharezLook so that explains it, no problem, simple fix :)

Cheers!


Return to “Offtopic Discussion”

Who is online

Users browsing this forum: No registered users and 16 guests