This is the corresponding entry in my looknfeel file:
Code: Select all
<WidgetLook name="BNBWidgets/Belt">
<!--PropertyDefinitions-->
<Child type="BNBWidgets/HealthBar" nameSuffix="Health">
<!--Area Definition, etc.-->
</Child>
<Child type="BNBWidgets/StaminaBar" nameSuffix="Stamina">
<!--Area Definition, etc.-->
</Child>
<Child type="DefaultWindow" nameSuffix="__auto_contentpane__">
<!--Area Definition, etc.-->
</Child>
<ImagerySection name="Label">
<!--TextComponent, Area Definition, etc.-->
</ImagerySection>
<ImagerySection name="Normal">
<!--FrameComponents, Area Defintions, etc.-->
</ImagerySection>
<StateImagery name="Enabled">
<Layer>
<Section section="Normal" />
<Section section="Label" controlProperty="LabelEnabled"><ColourProperty name="NormalTextColour" /></Section>
</Layer>
</StateImagery>
<StateImagery name="Disabled">
<Layer>
<Section section="Normal" />
<Section section="Label" controlProperty="LabelEnabled" ><ColourProperty name="DisabledTextColour" /></Section>
</Layer>
</StateImagery>
</WidgetLook>
These are the corresponding entries in my scheme file:
Code: Select all
<FalagardMapping WindowType="BNBWidgets/HealthBar" TargetType="CEGUI/ProgressBar" Renderer="Falagard/ProgressBar" LookNFeel="BNBWidgets/HealthBar" />
<FalagardMapping WindowType="BNBWidgets/StaminaBar" TargetType="CEGUI/ProgressBar" Renderer="Falagard/ProgressBar" LookNFeel="BNBWidgets/StaminaBar" />
<FalagardMapping WindowType="BNBWidgets/Belt" TargetType="CEGUI/GroupBox" Renderer="Falagard/Default" LookNFeel="BNBWidgets/Belt" />
CEGUI doesn't simply crash during the cleanup. It gets stuck in an endless loop:
Code: Select all
void Window::cleanupChildren(void)
{
while(getChildCount() != 0)
{
Window* wnd = d_children[0];
// always remove child
removeChildWindow(wnd);
// destroy child if that is required
if (wnd->isDestroyedByParent())
WindowManager::getSingleton().destroyWindow(wnd);
}
}
The root of this problem seems to be this method:
Code: Select all
void GroupBox::removeChild_impl(Window* wnd)
{
if (wnd)
{ // Auto pane itself?
if (wnd->getName().find(ContentPaneNameSuffix) != String::npos)
{ // Yes
Window::removeChild_impl(wnd);
WindowManager::getSingleton().destroyWindow(wnd);
}
else
{ // Remove child from out auto pane
Window* wndPane = getContentPane();
if (wndPane)
{
wndPane->removeChildWindow(wnd);
if (wnd->isDestroyedByParent())
{
WindowManager::getSingleton().destroyWindow(wnd);
}
}
}
}
}
These additional AutoWindows are neither the auto pane itself nor children of the content pane. Please correct me, if I'm wrong.
Here's my CEGUI.log in case it is needed.
EDIT: It's a bit off topic but: Is there a way to calculate Custom Properties (PropertyDefinitions) in a looknfeel file? Or can I define a named area and refer to it in ImageSections? I just want to reduce code duplication.