Difficulty Getting Titlebar Caption to Show Up

For help with general CEGUI usage:
- Questions about the usage of CEGUI and its features, if not explained in the documentation.
- Problems with the CMAKE configuration or problems occuring during the build process/compilation.
- Errors or unexpected behaviour.

Moderators: CEGUI MVP, CEGUI Team

tamakazura
Just popping in
Just popping in
Posts: 6
Joined: Wed Aug 04, 2010 21:57

Difficulty Getting Titlebar Caption to Show Up

Postby tamakazura » Fri Oct 08, 2010 23:54

Hello CEGUI People!

I have created my own tiling framewindow with its own titlebar and it shows up in game nicely aligned and looking good. However, when I type in a caption for the titlebar, this does not show up on the titlebar. I was wondering if any of you could tell me why? It looks good to me, and as I said, it shows up on screen looking right.
Also, the images are light coloured.
I am using the default renderer (falagard), and my looknfeel is set up as follows:

<WidgetLook name="MyLook/Titlebar">
<PropertyDefinition name="CaptionColour" initialValue="00000000" redrawOnWrite="true" />
<Property name="NonClient" value="True" />
<ImagerySection name="normal">
<FrameComponent>
<Area>
<Dim type="LeftEdge">
<AbsoluteDim value="0" />
</Dim>
<Dim type="TopEdge">
<AbsoluteDim value="0" />
</Dim>
<Dim type="RightEdge">
<UnifiedDim scale="1" type="RightEdge" />
</Dim>
<Dim type="BottomEdge">
<UnifiedDim scale="1" type="BottomEdge" />
</Dim>
</Area>
<Image type="TopLeftCorner" imageset="mywidgets" image="WindowTitleTopLeft" />
<Image type="TopRightCorner" imageset="mywidgets" image="WindowTitleTopRight" />
<Image type="BottomLeftCorner" imageset="mywidgets" image="WindowTitleBottomLeft" />
<Image type="BottomRightCorner" imageset="mywidgets" image="WindowTitleBottomRight" />
<Image type="LeftEdge" imageset="mywidgets" image="WindowTitleLeft" />
<Image type="TopEdge" imageset="mywidgets" image="WindowTitleTopCentre" />
<Image type="RightEdge" imageset="mywidgets" image="WindowTitleRight" />
<Image type="BottomEdge" imageset="mywidgets" image="WindowTitleBottomCentre" />
<Image type="Background" imageset="mywidgets" image="WindowTitleCentre" />
<VertFormat type="Stretched" />
<HorzFormat type="Tiled" />
</FrameComponent>
</ImagerySection>
<ImagerySection name="caption">
<TextComponent>
<Area>
<Dim type="LeftEdge" >
<AbsoluteDim value="12" />
</Dim>
<Dim type="TopEdge" >
<AbsoluteDim value="0" />
</Dim>
<Dim type="RightEdge" >
<UnifiedDim scale="1" type="RightEdge">
<DimOperator op="Subtract">
<WidgetDim dimension="Height" />
</DimOperator>
</UnifiedDim>
</Dim>
<Dim type="BottomEdge" >
<UnifiedDim scale="1" type="BottomEdge" />
</Dim>
</Area>
<ColourProperty name="CaptionColour" />
<VertFormat type="CentreAligned" />
</TextComponent>
</ImagerySection>
<StateImagery name="Active">
<Layer>
<Section section="caption" />
<Section section="normal"/>
</Layer>
</StateImagery>
<StateImagery name="Inactive">
<Layer>
<Section section="normal"/>
<Section section="caption" />
</Layer>
</StateImagery>
<StateImagery name="Disabled">
<Layer>
<Section section="normal" />
<Section section="caption" />
</Layer>
</StateImagery>
</WidgetLook>
Also, I've noticed that both my window and the other framewindows in the looknfeel file are referencing "__auto_titlebar__". This seems to be a macro of sort. Could there be some sort of conflict between my titlebar and the other auto_titlebars?

rockoz
Not too shy to talk
Not too shy to talk
Posts: 34
Joined: Tue Sep 22, 2009 02:26

Re: Difficulty Getting Titlebar Caption to Show Up

Postby rockoz » Sat Oct 09, 2010 01:27

You can try

Code: Select all

<PropertyDefinition name="CaptionColour" initialValue="FF000000" redrawOnWrite="true" />



HTH

tamakazura
Just popping in
Just popping in
Posts: 6
Joined: Wed Aug 04, 2010 21:57

Re: Difficulty Getting Titlebar Caption to Show Up

Postby tamakazura » Mon Oct 11, 2010 17:14

I've actually already given that a try.
Thanks anyway, though.

tamakazura
Just popping in
Just popping in
Posts: 6
Joined: Wed Aug 04, 2010 21:57

Re: Difficulty Getting Titlebar Caption to Show Up

Postby tamakazura » Mon Oct 11, 2010 17:52

Alright Fixed it. Not really sure how, because I changed a bunch of stuff at the same time, but the solution was probably
<PropertyLinkDefinition name="CaptionColour" widget="__auto_titlebar__" targetProperty="CaptionColour" initialValue="FF000000" />
Making sure the initial value of this attribute in the framwindow widgetlook was the same as the one in the titlebar.


Return to “Help”

Who is online

Users browsing this forum: No registered users and 12 guests