PushButton::setStandardImageryEnabled
Moderators: CEGUI MVP, CEGUI Team
- tgraupmann
- Quite a regular
- Posts: 78
- Joined: Thu Aug 18, 2005 00:47
- Contact:
PushButton::setStandardImageryEnabled
What did PushButton::setStandardImageryEnabled from CEGUI 4 convert to in CEGUI 5?
- tgraupmann
- Quite a regular
- Posts: 78
- Joined: Thu Aug 18, 2005 00:47
- Contact:
I just need to know what SetProperty should I use:
http://www.cegui.org.uk/wiki/index.php/SetProperty
Since there's nothing like the old method that I can see?
http://www.cegui.org.uk/wiki/index.php/SetProperty
Since there's nothing like the old method that I can see?
- CrazyEddie
- CEGUI Project Lead
- Posts: 6760
- Joined: Wed Jan 12, 2005 12:06
- Location: England
- Contact:
IIRC a replacement provision for this was not enabled in the skins provided with 0.5.x code; I guess at the time the idea was that people could basically knock up a simple button skin to do whatever they needed, so this particular ability was omitted.
If you need that specific behaviour, it can be emulated by modifying the skin. The <Section> element, which is used within <Layer> elements which appear in the various <StateImagery> specifications, has an attribute called 'controlProperty' - this can be used to specify the name of a boolean property (which should be added to the widget via a <PropertyDefinition>) that controls whether the section imagery will be rendered.
Basically you add a property named "StandardImageryEnabled" and use the 'controlPropery' feature described above to decide whether to render certain imagery.
Somewhere at the top of the LookNFeel for a button...
Later on in the StateImagery bits...
If you need that specific behaviour, it can be emulated by modifying the skin. The <Section> element, which is used within <Layer> elements which appear in the various <StateImagery> specifications, has an attribute called 'controlProperty' - this can be used to specify the name of a boolean property (which should be added to the widget via a <PropertyDefinition>) that controls whether the section imagery will be rendered.
Basically you add a property named "StandardImageryEnabled" and use the 'controlPropery' feature described above to decide whether to render certain imagery.
Somewhere at the top of the LookNFeel for a button...
Code: Select all
...
<PropertyDefinition name="StandardImageryEnabled" initialValue="True" redrawOnWrite="true" />
...
Later on in the StateImagery bits...
Code: Select all
...
<StateImagery name="Normal">
<Layer>
<Section section="normal" controlProperty="StandardImageryEnabled" />
<Section section="label">
<ColourProperty name="NormalTextColour" />
<Section>
</Layer>
</StateImagery>
<StateImagery name="Hover">
<Layer>
<Section section="hover" controlProperty="StandardImageryEnabled" />
<Section section="label">
<ColourProperty name="HoverTextColour" />
</Section>
</Layer>
</StateImagery>
...
- tgraupmann
- Quite a regular
- Posts: 78
- Joined: Thu Aug 18, 2005 00:47
- Contact:
Who is online
Users browsing this forum: No registered users and 16 guests