http://i.imgur.com/QxxVNcf.jpg
(It cuts off on the left because I thought maybe resizing the root DefaultWindow so that it didn't take up the whole screen would allow stuff to continue drawing in the space on the left, but that didn't work)
I did a bit of testing with different layouts, some of them worked and some of them didn't, and it seems that any layouts I make with a "Vanilla/StaticText" window in them 'cause this problem, whereas if I have something like a FrameWindow instead it works fine. At first I thought maybe the StaticText window doesn't cause the GUI to redraw (since it's 'static' so maybe assumed it won't change?), but that doesn't seem to be the case as currently I'm using SetText to update a timer (Which you can see in the bottom right of the screenshot) and that redraws fine, showing the correct time as it counts down.
Any idea what would be causing this or how I could fix it? My log doesn't show any errors or anything, but I'll paste in the essential bit and my layout file:
Code: Select all
11/02/2013 17:03:13 (Std) ********************************************************************************
11/02/2013 17:03:13 (Std) * -------- START OF ESSENTIAL SECTION TO BE POSTED ON THE FORUM -------- *
11/02/2013 17:03:13 (Std) ********************************************************************************
11/02/2013 17:03:13 (Std) ---- Version 0.7.9 (Build: Feb 3 2013 Microsoft Windows MSVC++ 10.0 32 bit) ----
11/02/2013 17:03:13 (Std) ---- Renderer module is: CEGUI::Direct3D9Renderer - Official Direct3D 9 based 2nd generation renderer module. ----
11/02/2013 17:03:13 (Std) ---- XML Parser module is: CEGUI::ExpatParser - Official expat based parser module for CEGUI ----
11/02/2013 17:03:13 (Std) ---- Image Codec module is: SILLYImageCodec - Official SILLY based image codec ----
11/02/2013 17:03:13 (Std) ---- Scripting module is: None ----
11/02/2013 17:03:13 (Std) ********************************************************************************
11/02/2013 17:03:13 (Std) * -------- END OF ESSENTIAL SECTION TO BE POSTED ON THE FORUM -------- *
11/02/2013 17:03:13 (Std) ********************************************************************************
Code: Select all
<?xml version="1.0" encoding="UTF-8"?>
<GUILayout >
<Window Type="DefaultWindow" Name="Root" >
<Property Name="UnifiedAreaRect" Value="{{0,0},{0,0},{1,0},{1,0}}" />
<Window Type="Vanilla/StaticText" Name="Timer" >
<Property Name="Font" Value="DejaVuSans-30" />
<Property Name="Text" Value="0" />
<Property Name="HorzExtent" Value="26" />
<Property Name="VertExtent" Value="46.5625" />
<Property Name="HorzFormatting" Value="HorzCentred" />
<Property Name="UnifiedAreaRect" Value="{{0,-18},{0,-18},{0,48},{0,48}}" />
<Property Name="VerticalAlignment" Value="Bottom" />
<Property Name="HorizontalAlignment" Value="Right" />
</Window>
</Window>
</GUILayout>
Changing the "Vanilla/StaticText" to "Vanilla/FrameWindow" makes it work perfectly, but unfortunately I'd rather just have a StaticText window. Oh and the other windows you can see in the screenshot were being added dynamically in code, but I've disabled those completely, so the one StaticText window in the above layout file is the only one being added. Also just realised this might have been more appropriate in the Bug Reports forum, but I'm unsure if it actually is a bug or simply something I've done wrong in creating the layout since I'm new to CEGUI. :3
EDIT: So I tried some stuff to force the GUI to redraw to see if that would fix it, such as:
Invalidating the StaticText window and the root DefaultWindow every frame.
Calling signalRedraw on the system every frame.
Calling invalidateAllCachedRendering on the system every frame.
Manually calling render on the root window every frame.
Unfortunately none of those worked
I also noticed that around the edges of the StaticText window, where the border images are transparent, you can actually see what's behind being updated every frame. It seems everywhere but the StaticText window just refuses to redraw...
http://i.imgur.com/nCXmb5V.png