help: property definition does not change in .layout - why?

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

Not too shy to talk
Not too shy to talk
Posts: 39
Joined: Sun May 13, 2007 03:24

help: property definition does not change in .layout - why?

Postby lymantok » Wed Aug 08, 2007 04:00

The property definition in the following looknfeel displays a blue titlebar, however, it does not change to red when set in the .layout file (but does change if altered in code). Why is this? Why does'nt the .layout file cause a change in titlebar color from blue to red?

<WidgetLook name = "QuadraticLook/Titlebar">
<PropertyDefinition name = "CaptionColour" initialValue = "FFFFFFFF" redrawOnWrite = "true" />
<PropertyDefinition name = "BaseColour" initialValue = "FF0000FF" redrawOnWrite = "true" />
<ColourProperty name = "BaseColour" />


<Window Type="QuadraticLook/FrameWindow" Name="Demo7/Window3" >
<Property Name="Text" Value="Quadratic Skin - Window Title Bar" />
<Property Name="TitlebarFont" Value="DejaVuSans-10" />
<Property Name="BaseColour" Value="FFFF0000" />

Just popping in
Just popping in
Posts: 2
Joined: Thu Mar 01, 2007 20:50

Postby Eldarin » Sat Nov 10, 2007 12:10

The reason for this is because "BaseColour" is defined in "QuadraticLook/Titlebar", but when accessing it in the layout it is set for "QuadraticLook/FrameWindow", where no such property is defined. That's why it does not do any change to the widget.
I have added a PropertyLinkDefinition to "QuadraticLook/FrameWindow" like this:

Code: Select all

<PropertyLinkDefinition name = "BaseColour" widget = "__auto_titlebar__" targetProperty = "BaseColour" initialValue = "D353626B" />

It adds a link to the "BaseColour" property defined in "QuadraticLook/Titlebar".
Now setting the colour for the titlebar works :)
I'll try to upload modified version of QuadraticLook 0.5.0 with this improvement added.

Return to “Modifications / Integrations / Customisations”

Who is online

Users browsing this forum: No registered users and 13 guests