I'm not sure but I might have found a bug in FrameWindow. I'm creating a FrameWindow firstly and then adding child windows to it. When I'm setting properties like setTitleBarEnabled(false) (such that change window's state imagery and named areas) for FrameWindow before adding children everything works fine but if I try to add setTitleBarEnabled(false) after adding children to FrameWindow the overall image gets spoilt.
Here's how it looks when I'm setting setTitleBarEnabled(false) before adding children(correct image):
And here when I'm adding that property after adding children(bad look and interaction with listbox on the left fails):
CEGUI.log:
Code: Select all
25/01/2013 17:12:21 (Std) * -------- START OF ESSENTIAL SECTION TO BE POSTED ON THE FORUM -------- *
25/01/2013 17:12:21 (Std) ********************************************************************************
25/01/2013 17:12:21 (Std) ---- Version 0.7.8 (Build: Dec 24 2012 Microsoft Windows MSVC++ 9.0 32 bit) ----
25/01/2013 17:12:21 (Std) ---- Renderer module is: CEGUI::Direct3D9Renderer - Official Direct3D 9 based 2nd generation renderer module. ----
25/01/2013 17:12:21 (Std) ---- XML Parser module is: CEGUI::ExpatParser - Official expat based parser module for CEGUI ----
25/01/2013 17:12:21 (Std) ---- Image Codec module is: SILLYImageCodec - Official SILLY based image codec ----
25/01/2013 17:12:21 (Std) ---- Scripting module is: None ----
25/01/2013 17:12:21 (Std) ********************************************************************************
25/01/2013 17:12:21 (Std) * -------- END OF ESSENTIAL SECTION TO BE POSTED ON THE FORUM -------- *
My FrameWindow's LookNFeel:
Code: Select all
<!--
***************************************************
Game/FrameWindow
***************************************************
-->
<WidgetLook name="Game/FrameWindow">
<PropertyDefinition name="ClientAreaColour" initialValue="FF141B38" redrawOnWrite="true" />
<PropertyLinkDefinition name="CaptionColour" widget="__auto_titlebar__" targetProperty="CaptionColour" initialValue="FFFFFFFF" />
<PropertyLinkDefinition name="TitlebarFont" widget="__auto_titlebar__" targetProperty="Font" />
<Property name="NSSizingCursorImage" value="set:Game image:MouseNoSoCursor" />
<Property name="EWSizingCursorImage" value="set:Game image:MouseEsWeCursor" />
<Property name="NWSESizingCursorImage" value="set:Game image:MouseNwSeCursor" />
<Property name="NESWSizingCursorImage" value="set:Game image:MouseNeSwCursor" />
<Property name="UnifiedMinSize" value="{{0.1,0},{0.1,0}}" />
<Property name="AutoRenderingSurface" value="True" />
<Property name="TitlebarFont" value="NEORD" />
<NamedArea name="ClientWithTitleWithFrame">
<Area>
<Dim type="LeftEdge" ><ImageDim imageset="Game" image="FrameLeft" dimension="Width" /></Dim>
<Dim type="TopEdge" >
<WidgetDim widget="__auto_titlebar__" dimension="BottomEdge" >
<DimOperator op="Subtract">
<AbsoluteDim value="15" />
</DimOperator>
</WidgetDim>
</Dim>
<Dim type="RightEdge" >
<UnifiedDim scale="1" type="RightEdge">
<DimOperator op="Subtract">
<ImageDim imageset="Game" image="FrameRight" dimension="Width" />
</DimOperator>
</UnifiedDim>
</Dim>
<Dim type="BottomEdge" >
<UnifiedDim scale="1" type="BottomEdge">
<DimOperator op="Subtract">
<ImageDim imageset="Game" image="FrameBottom" dimension="Height" >
<DimOperator op="Subtract">
<AbsoluteDim value="10" />
</DimOperator>
</ImageDim>
</DimOperator>
</UnifiedDim>
</Dim>
</Area>
</NamedArea>
<NamedArea name="ClientWithTitleNoFrame">
<Area>
<Dim type="LeftEdge" ><AbsoluteDim value="0" /></Dim>
<Dim type="TopEdge" ><WidgetDim widget="__auto_titlebar__" dimension="BottomEdge" /></Dim>
<Dim type="Width" ><UnifiedDim scale="1" type="Width" /></Dim>
<Dim type="BottomEdge" ><WidgetDim dimension="BottomEdge" /></Dim>
</Area>
</NamedArea>
<NamedArea name="ClientNoTitleWithFrame">
<Area>
<Dim type="LeftEdge" ><ImageDim imageset="Game" image="FrameLeft" dimension="Width" /></Dim>
<Dim type="TopEdge" >
<ImageDim imageset="Game" image="FrameTop" dimension="Height" >
<DimOperator op="Subtract">
<AbsoluteDim value="15" />
</DimOperator>
</ImageDim>
</Dim>
<Dim type="RightEdge" >
<UnifiedDim scale="1" type="RightEdge">
<DimOperator op="Subtract">
<ImageDim imageset="Game" image="FrameRight" dimension="Width" />
</DimOperator>
</UnifiedDim>
</Dim>
<Dim type="BottomEdge" >
<UnifiedDim scale="1" type="BottomEdge">
<DimOperator op="Subtract">
<ImageDim imageset="Game" image="FrameBottom" dimension="Height" >
<DimOperator op="Subtract">
<AbsoluteDim value="10" />
</DimOperator>
</ImageDim>
</DimOperator>
</UnifiedDim>
</Dim>
</Area>
</NamedArea>
<NamedArea name="ClientNoTitleNoFrame">
<Area>
<Dim type="LeftEdge" ><AbsoluteDim value="0" /></Dim>
<Dim type="TopEdge" ><AbsoluteDim value="0" /></Dim>
<Dim type="Width" ><UnifiedDim scale="1" type="Width" /></Dim>
<Dim type="Height" ><UnifiedDim scale="1" type="Height" /></Dim>
</Area>
</NamedArea>
<Child type="Game/Titlebar" nameSuffix="__auto_titlebar__">
<Area>
<Dim type="LeftEdge" ><AbsoluteDim value="0" /></Dim>
<Dim type="TopEdge" ><AbsoluteDim value="0" /></Dim>
<Dim type="Width" ><UnifiedDim scale="1" type="Width" /></Dim>
<Dim type="Height" >
<UnifiedDim scale="0.5" type="Height" >
<DimOperator op="Multiply">
<AbsoluteDim value="300">
<DimOperator op="Divide">
<UnifiedDim scale="1.0" type="Height" />
</DimOperator>
</AbsoluteDim>
</DimOperator>
</UnifiedDim>
</Dim>
</Area>
<Property name="AlwaysOnTop" value="False" />
</Child>
<Child type="Game/ImageButton" nameSuffix="__auto_closebutton__">
<Area>
<Dim type="LeftEdge" ><AbsoluteDim value="30" /></Dim>
<Dim type="TopEdge" ><AbsoluteDim value="30" /></Dim>
<Dim type="Width" ><ImageDim imageset="Game" image="CloseButton" dimension="Width" /></Dim>
<Dim type="Height" ><ImageDim imageset="Game" image="CloseButton" dimension="Width" /></Dim>
</Area>
<Property name="AlwaysOnTop" value="True" />
<!--
<Property name="NormalImage" value="set:Game image:CloseButtonNormal" />
<Property name="HoverImage" value="set:Game image:CloseButtonHover" />
<Property name="PushedImage" value="set:Game image:CloseButtonPressed" />
-->
<Property name="NonClient" value="True" />
</Child>
<ImagerySection name="with_title_frame-background">
<ImageryComponent>
<Area>
<Dim type="LeftEdge" ><AbsoluteDim value="32" /></Dim>
<Dim type="TopEdge" >
<WidgetDim widget="__auto_titlebar__" dimension="BottomEdge" >
<DimOperator op="Subtract">
<UnifiedDim scale="0.23" type="Height" >
<DimOperator op="Multiply">
<AbsoluteDim value="300">
<DimOperator op="Divide">
<UnifiedDim scale="1.0" type="Height" />
</DimOperator>
</AbsoluteDim>
</DimOperator>
</UnifiedDim>
</DimOperator>
</WidgetDim>
</Dim>
<Dim type="RightEdge" >
<UnifiedDim scale="1" type="Width" >
<DimOperator op="Subtract">
<AbsoluteDim value="32" />
</DimOperator>
</UnifiedDim>
</Dim>
<Dim type="BottomEdge" >
<UnifiedDim scale="1" type="Height">
<DimOperator op="Subtract">
<AbsoluteDim value="32" />
</DimOperator>
</UnifiedDim>
</Dim>
</Area>
<Image imageset="Game" image="BackgroundBrush" />
<ColourProperty name="ClientAreaColour" />
<Property name="Alpha" value="0.9" />
<VertFormat type="Stretched" />
<HorzFormat type="Stretched" />
</ImageryComponent>
</ImagerySection>
<ImagerySection name="just_frame">
<FrameComponent>
<Area>
<Dim type="LeftEdge" ><AbsoluteDim value="0" /></Dim>
<Dim type="TopEdge" >
<WidgetDim widget="__auto_titlebar__" dimension="BottomEdge" >
<DimOperator op="Subtract">
<UnifiedDim scale="0.33" type="Height" >
<DimOperator op="Multiply">
<AbsoluteDim value="300">
<DimOperator op="Divide">
<UnifiedDim scale="1.0" type="Height" />
</DimOperator>
</AbsoluteDim>
</DimOperator>
</UnifiedDim>
</DimOperator>
</WidgetDim>
</Dim>
<Dim type="Width" >
<UnifiedDim scale="1" type="Width" />
</Dim>
<Dim type="BottomEdge" ><UnifiedDim scale="1" type="BottomEdge" /></Dim>
</Area>
<Image type="TopEdge" imageset="Game" image="FrameTop" />
<Image type="TopLeftCorner" imageset="Game" image="FrameLeftTop" />
<Image type="TopRightCorner" imageset="Game" image="FrameRightTop" />
<Image type="BottomLeftCorner" imageset="Game" image="FrameLeftBottom" />
<Image type="BottomRightCorner" imageset="Game" image="FrameRightBottom" />
<Image type="LeftEdge" imageset="Game" image="FrameLeft" />
<Image type="RightEdge" imageset="Game" image="FrameRight" />
<Image type="BottomEdge" imageset="Game" image="FrameBottom" />
</FrameComponent>
</ImagerySection>
<ImagerySection name="notitle_frame-background">
<ImageryComponent>
<Area>
<Dim type="LeftEdge" >
<ImageDim imageset="Game" image="FrameLeft" dimension="Width" >
<DimOperator op="Subtract">
<AbsoluteDim value="20" />
</DimOperator>
</ImageDim>
</Dim>
<Dim type="TopEdge" >
<ImageDim imageset="Game" image="FrameTop" dimension="Height" >
<DimOperator op="Subtract">
<AbsoluteDim value="30" />
</DimOperator>
</ImageDim>
</Dim>
<Dim type="RightEdge" >
<UnifiedDim scale="1" type="Width">
<DimOperator op="Subtract">
<AbsoluteDim value="25" />
</DimOperator>
</UnifiedDim>
</Dim>
<Dim type="BottomEdge" >
<UnifiedDim scale="1" type="Height">
<DimOperator op="Subtract">
<AbsoluteDim value="25" />
</DimOperator>
</UnifiedDim>
</Dim>
</Area>
<Image imageset="Game" image="BackgroundBrush" />
<ColourProperty name="ClientAreaColour" />
<Property name="Alpha" value="0.9" />
<VertFormat type="Stretched" />
<HorzFormat type="Stretched" />
</ImageryComponent>
</ImagerySection>
<ImagerySection name="just_frame_for_no_title">
<FrameComponent>
<Area>
<Dim type="LeftEdge" ><AbsoluteDim value="0" /></Dim>
<Dim type="TopEdge" ><AbsoluteDim value="0" /></Dim>
<Dim type="Width" >
<UnifiedDim scale="1" type="Width" />
</Dim>
<Dim type="BottomEdge" ><UnifiedDim scale="1" type="BottomEdge" /></Dim>
</Area>
<Image type="TopEdge" imageset="Game" image="FrameTop" />
<Image type="TopLeftCorner" imageset="Game" image="FrameLeftTop" />
<Image type="TopRightCorner" imageset="Game" image="FrameRightTop" />
<Image type="BottomLeftCorner" imageset="Game" image="FrameLeftBottom" />
<Image type="BottomRightCorner" imageset="Game" image="FrameRightBottom" />
<Image type="LeftEdge" imageset="Game" image="FrameLeft" />
<Image type="RightEdge" imageset="Game" image="FrameRight" />
<Image type="BottomEdge" imageset="Game" image="FrameBottom" />
</FrameComponent>
</ImagerySection>
<ImagerySection name="withtitle_noframe_client_area">
<ImageryComponent>
<Area>
<Dim type="LeftEdge" ><AbsoluteDim value="0" /></Dim>
<Dim type="TopEdge" ><WidgetDim widget="__auto_titlebar__" dimension="Height" /></Dim>
<Dim type="Width" ><UnifiedDim scale="1" type="Width" /></Dim>
<Dim type="BottomEdge" ><UnifiedDim scale="1" type="BottomEdge" /></Dim>
</Area>
<Image imageset="Game" image="BackgroundBrush" />
<ColourProperty name="ClientAreaColour" />
<VertFormat type="Stretched" />
<HorzFormat type="Stretched" />
</ImageryComponent>
</ImagerySection>
<ImagerySection name="notitle_noframe_client_area">
<ImageryComponent>
<Area>
<Dim type="LeftEdge" ><AbsoluteDim value="0" /></Dim>
<Dim type="TopEdge" ><AbsoluteDim value="0" /></Dim>
<Dim type="Width" ><UnifiedDim scale="1" type="Width" /></Dim>
<Dim type="Height" ><UnifiedDim scale="1" type="Height" /></Dim>
</Area>
<Image imageset="Game" image="BackgroundBrush" />
<ColourProperty name="ClientAreaColour" />
<VertFormat type="Stretched" />
<HorzFormat type="Stretched" />
</ImageryComponent>
</ImagerySection>
<StateImagery name="ActiveWithTitleWithFrame">
<Layer priority="1">
<Section section="just_frame" />
</Layer>
<Layer>
<Section section="with_title_frame-background" />
</Layer>
</StateImagery>
<StateImagery name="InactiveWithTitleWithFrame">
<Layer priority="1">
<Section section="just_frame" />
</Layer>
<Layer>
<Section section="with_title_frame-background" />
</Layer>
</StateImagery>
<StateImagery name="DisabledWithTitleWithFrame">
<Layer>
<Section section="with_title_frame-background">
<Colours topLeft="FF7F7F7F" topRight="FF7F7F7F" bottomLeft="FF7F7F7F" bottomRight="FF7F7F7F" />
</Section>
</Layer>
</StateImagery>
<StateImagery name="ActiveWithTitleNoFrame">
<Layer>
<Section section="withtitle_noframe_client_area" />
</Layer>
</StateImagery>
<StateImagery name="InactiveWithTitleNoFrame">
<Layer>
<Section section="withtitle_noframe_client_area" />
</Layer>
</StateImagery>
<StateImagery name="DisabledWithTitleNoFrame">
<Layer>
<Section section="withtitle_noframe_client_area">
<Colours topLeft="FF7F7F7F" topRight="FF7F7F7F" bottomLeft="FF7F7F7F" bottomRight="FF7F7F7F" />
</Section>
</Layer>
</StateImagery>
<StateImagery name="ActiveNoTitleWithFrame">
<Layer priority="1">
<Section section="just_frame_for_no_title" />
</Layer>
<Layer>
<Section section="notitle_frame-background" />
</Layer>
</StateImagery>
<StateImagery name="InactiveNoTitleWithFrame">
<Layer priority="1">
<Section section="just_frame_for_no_title" />
</Layer>
<Layer>
<Section section="notitle_frame-background" />
</Layer>
</StateImagery>
<StateImagery name="DisabledNoTitleWithFrame">
<Layer priority="1">
<Section section="just_frame_for_no_title" />
</Layer>
<Layer>
<Section section="notitle_frame-background">
<Colours topLeft="FF7F7F7F" topRight="FF7F7F7F" bottomLeft="FF7F7F7F" bottomRight="FF7F7F7F" />
</Section>
</Layer>
</StateImagery>
<StateImagery name="ActiveNoTitleNoFrame">
<Layer>
<Section section="notitle_noframe_client_area" />
</Layer>
</StateImagery>
<StateImagery name="InactiveNoTitleNoFrame">
<Layer>
<Section section="notitle_noframe_client_area" />
</Layer>
</StateImagery>
<StateImagery name="DisabledNoTitleNoFrame">
<Layer>
<Section section="notitle_noframe_client_area">
<Colours topLeft="FF7F7F7F" topRight="FF7F7F7F" bottomLeft="FF7F7F7F" bottomRight="FF7F7F7F" />
</Section>
</Layer>
</StateImagery>
</WidgetLook>
Is that possible that it's a bug or that's correct CEGUI behaviour? I will be really grateful for any help in this matter and I really appreciate your time spent here!