I recently wrapped some of my UI items in SequentialLayoutContainers in order to give me greater flexibility in what is displayed in my UI windows. I'm running into an issue though where setting the position of the parent window (via SetPosition()) is not updating the position of the container, leaving its child elements in their old position. If I remove the layout container, everything works as expected.
Here's part of the layout for the window:
Code: Select all
<Window name="PlayStateTileInfo_FrameWindow" type="TaharezLook/FrameWindow" >
<Property name="Size" value="{{0,325},{0,350}}" />
<Property name="FrameEnabled" value="true" />
<Property name="Disabled" value="true" />
<Property name="Visible" value="false" />
<Property name="Text" value="Tile Information" />
<Property name="TitlebarEnabled" value="true" />
<Property name="CloseButtonEnabled" value="true" />
<Property name="RollUpEnabled" value="false" />
<Property name="SizingEnabled" value="false" />
<!-- Coordinates Information -->
<Window name="GPSCoordinates_HLC" type="HorizontalLayoutContainer" >
<Property name="Position" value="{{0.1,-15.0},{0.05,-12.5}}" />
<Property name="Size" value="{{1.0,0.0},{0.0,25.0}}" />
<Window name="GPSCoordinatesTag_Label" type="TaharezLook/Label" >
<Property name="Text" value="Coordinates:" />
<Property name="Size" value="{{0.0,0.0},{0.0,25.0}}" />
<Property name="HorzFormatting" value="LeftAligned" />
</Window>
<Window name="GPSCoordinates_Label" type="TaharezLook/Label" >
<Property name="Size" value="{{0,0.0},{0,25}}" />
<Property name="HorzFormatting" value="LeftAligned" />
<Property name="Margin" value="{top:{0.0,0.0},left:{0.05,0.0},bottom:{0.0,0.0},right:{0.0,0.0}}" />
</Window>
</Window>
</Window>
Here's the code updating the position
Code: Select all
tileContentsWindow = static_cast< CEGUI::FrameWindow * >( m_uiSheet->getChildRecursive("PlayStateTileInfo_FrameWindow"));
tileContentsWindow ->setPosition( CEGUI::UVector2(
CEGUI::UDim( 0.f, mouseX + 40 ),
CEGUI::UDim( 0.f, mouseY - 100 ) ) );
Any thoughts on why the update to the position is not being propagated properly? Thank you in advance for the help
CEGUI Info
Code: Select all
---- Version: 0.8.4 (Build: Jul 13 2016 Static Debug Microsoft Windows MSVC++ 11.0 32 bit) ----
---- Renderer module is: CEGUI::OgreRenderer - Official OGRE based 2nd generation renderer module. ----
---- XML Parser module is: CEGUI::RapidXMLParser - Official RapidXML based parser module for CEGUI ----
---- Image Codec module is: OgreImageCodec - Integrated ImageCodec using the Ogre engine. ----
---- Scripting module is: None ----