This thing is, when i resize my window (the application, not in-game window), the StaticText components does not get updated, causing the text to not be re-formatted; so, depending the case, i get a part of the control empty, or text outside of it (not visible of course).
I'm using the following layout in case is significant:
Code: Select all
<?xml version="1.0" encoding="UTF-8"?>
<GUILayout >
<Window Type="TaharezLook/FrameWindow" Name="NotImplemented" >
<Property Name="TitlebarFont" Value="DejaVuSans-10" />
<Property Name="TitlebarEnabled" Value="True" />
<Property Name="UnifiedAreaRect" Value="{{0.384664,0},{0.318391,0},{0.634664,0},{0.568391,0}}" />
<Window Type="TaharezLook/StaticText">
<Property Name="Text" Value="This is not implemented yet! Sorry =D" />
<Property Name="HorzFormatting" Value="WordWrapCentred" />
<Property Name="UnifiedAreaRect" Value="{{0,0},{0,0},{1,0},{0.75,0}}" />
<Property Name="HorizontalAlignment" Value="Centre" />
</Window>
<Window Type="TaharezLook/Button" Name="NotImplemented/Close" >
<Property Name="Text" Value="Close" />
<Property Name="UnifiedAreaRect" Value="{{0,0},{0.75,0},{1,0},{1,0}}" />
</Window>
</Window>
</GUILayout>
I think it must be something to do with StaticText not beign a Window object per-se (which is the case with falagard controls, please someone correct me if i'm wrong), so when System::notifyDisplaySizeChanged() invalidates all windows, the StaticText does not know about this change.
I patched my code to handle the EventRenderingStarted to cause the StaticText to reformat the contents but i'm not sure if this is the corrent approach or i'm missing something ^^.
In case someone wants to check this issue (CE, *coff* *coff*), here's a patch. I'm working with svn rev. 2614 (basically 0.7.2 release).
Code: Select all
Index: cegui/include/WindowRendererSets/Falagard/FalStaticText.h
===================================================================
--- cegui/include/WindowRendererSets/Falagard/FalStaticText.h (revisión: 2614)
+++ cegui/include/WindowRendererSets/Falagard/FalStaticText.h (copia de trabajo)
@@ -187,6 +187,7 @@
bool onSized(const EventArgs& e);
bool onFontChanged(const EventArgs& e);
bool onMouseWheel(const EventArgs& e);
+ bool onRenderingStarted(const EventArgs& e);
// event subscribers
bool handleScrollbarChange(const EventArgs& e);
Index: cegui/src/WindowRendererSets/Falagard/FalStaticText.cpp
===================================================================
--- cegui/src/WindowRendererSets/Falagard/FalStaticText.cpp (revisión: 2614)
+++ cegui/src/WindowRendererSets/Falagard/FalStaticText.cpp (copia de trabajo)
@@ -407,6 +407,17 @@
return true;
}
+
+ /*************************************************************************
+ Handler called when d_window redraws
+ *************************************************************************/
+ bool FalagardStaticText::onRenderingStarted(const EventArgs&)
+ {
+ d_formatValid = false;
+ configureScrollbars();
+
+ return true;
+ }
/*************************************************************************
@@ -454,6 +465,10 @@
d_connections.push_back(
d_window->subscribeEvent(Window::EventMouseWheel,
Event::Subscriber(&FalagardStaticText::onMouseWheel, this)));
+
+ d_connections.push_back(
+ d_window->subscribeEvent(Window::EventRenderingStarted,
+ Event::Subscriber(&FalagardStaticText::onRenderingStarted, this)));
}
void FalagardStaticText::onLookNFeelUnassigned()