When I load a child window with the following layout, the position goes wrong.
Code: Select all
<?xml version="1.0" encoding="UTF-8"?>
<GUILayout >
<Window Type="DefaultWindow" Name="Avatar" >
<Property Name="InheritsAlpha" Value="False" />
<Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
<Property Name="UnifiedAreaRect" Value="{{1,-120},{1,-142},{1,0},{1,0}}" />
<Property Name="ClippedByParent" Value="False" />
<Window Type="TaharezLook/StaticImage" Name="Avatar/Backgound" >
<Property Name="FrameEnabled" Value="False" />
<Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
<Property Name="ClippedByParent" Value="False" />
<Property Name="UnifiedAreaRect" Value="{{0,-10},{0,0},{1,-10},{1,0}}" />
<Property Name="BackgroundEnabled" Value="False" />
<Window Type="TaharezLook/StaticImage" Name="Avatar/Backgound/Frame" >
<Property Name="FrameEnabled" Value="False" />
<Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
<Property Name="UnifiedAreaRect" Value="{{0,0},{0,0},{1,0},{1,0}}" />
<Property Name="BackgroundEnabled" Value="False" />
<Window Type="TaharezLook/StaticImage" Name="Avatar/Backgound/Frame/Char" >
<Property Name="FrameEnabled" Value="False" />
<Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
<Property Name="UnifiedAreaRect" Value="{{0,0},{0,0},{1,0},{1,0}}" />
<Property Name="BackgroundEnabled" Value="False" />
</Window>
</Window>
</Window>
</Window>
</GUILayout>
When I use the following code to add a child window, the position is not correct.
Code: Select all
ava=winMgr.loadWindowLayout("avatar.layout",parent->getName()+CEGUI::String("/"));
parent->addChildWindow(ava);
After I add the following line, it works.
Code: Select all
ava->setPosition(UVector2(UDim(0,0),UDim(0,0)));
Further more, if I use the following layout, I don't find a suitable solution to get it work.
But the following layout works with CEGUI 0.6.2.
Code: Select all
<?xml version="1.0" encoding="UTF-8"?>
<GUILayout >
<Window Type="DefaultWindow" Name="Avatar" >
<Property Name="InheritsAlpha" Value="False" />
<Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
<Property Name="UnifiedAreaRect" Value="{{0,-10},{0,0},{1,-10},{1,0}}" />
<Property Name="UnifiedWidth" Value="{0,120}" />
<Property Name="UnifiedHeight" Value="{0,142}" />
<Property Name="ClippedByParent" Value="False" />
<Window Type="TaharezLook/StaticImage" Name="Avatar/Backgound" >
<Property Name="FrameEnabled" Value="False" />
<Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
<Property Name="ClippedByParent" Value="False" />
<Property Name="UnifiedAreaRect" Value="{{0,0},{0,0},{1,0},{1,0}}" />
<Property Name="BackgroundEnabled" Value="False" />
<Window Type="TaharezLook/StaticImage" Name="Avatar/Backgound/Frame" >
<Property Name="FrameEnabled" Value="False" />
<Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
<Property Name="UnifiedAreaRect" Value="{{0,0},{0,0},{1,0},{1,0}}" />
<Property Name="BackgroundEnabled" Value="False" />
<Window Type="TaharezLook/StaticImage" Name="Avatar/Backgound/Frame/Char" >
<Property Name="FrameEnabled" Value="False" />
<Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
<Property Name="UnifiedAreaRect" Value="{{0,0},{0,0},{1,0},{1,0}}" />
<Property Name="BackgroundEnabled" Value="False" />
</Window>
</Window>
</Window>
</Window>
</GUILayout>