a problem with Tree
Posted: Sat Jun 13, 2009 15:36
Hi - I'm new to both CEGUI and OGRE(1.6.1) and am trying to figure out some CEGUI basics for a C++ project.
I'm currently having a problem with Tree.
Whenever I add one to my layout it bombs out. However, the samples work just fine.
main.layout:
<Window Type="TaharezLook/FrameWindow" Name="MyWindow">
<Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
<Property Name="UnifiedMinSize" Value="{{0,128},{0,128}}" />
<Property Name="UnifiedSize" Value="{{0.5,0},{0.8,0}}" />
<Property Name="Text" Value="Tree Demo" />
<Property Name="CloseButtonEnabled" Value="False" />
<Property Name="SizingEnabled" Value="True" />
<Property Name="FrameEnabled" Value="True" />
<Property Name="RollUpEnabled" Value="True" />
<Property Name="SizingBorderThickness" Value="8.0" />
<Window Type="TaharezLook/Tree" Name="MyTree">
<Property Name="ID" Value="1" />
<Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
<Property Name="UnifiedSize" Value="{{0.96,0},{0.75,0}}" />
<Property Name="UnifiedPosition" Value="{{0.02,0},{0.1,0}}" />
</Window>
</Window>
TaharezLook.looknfeel:
<!--
***************************************************
TaharezLook/Tree
***************************************************
-->
<WidgetLook name="TaharezLook/Tree">
<PropertyDefinition name="SelectionBrushImage" initialValue="set:TaharezLook image:selectico" redrawOnWrite="true" />
<PropertyDefinition name="NormalTextColour" initialValue="FF000000" redrawOnWrite="true" />
<PropertyDefinition name="SelectedTextColour" initialValue="FFFFFFFF" redrawOnWrite="true" />
<PropertyDefinition name="ActiveSelectionColour" initialValue="FF607FFF" redrawOnWrite="true" />
<PropertyDefinition name="InactiveSelectionColour" initialValue="FF808080" redrawOnWrite="true" />
<PropertyDefinition name="FrameColours" initialValue="tl:FFFFFFFF tr:FFFFFFFF bl:FFFFFFFF br:FFFFFFFF" redrawOnWrite="true" />
<NamedArea name="ItemRenderingArea">
<Area>
<Dim type="LeftEdge" ><ImageDim imageset="TaharezLook" image="windows2leftmiddle" dimension="Width" /></Dim>
<Dim type="TopEdge" ><ImageDim imageset="TaharezLook" image="windows2middletop" dimension="Height" /></Dim>
<Dim type="RightEdge" >
<UnifiedDim scale="1" type="RightEdge">
<DimOperator op="Subtract">
<ImageDim imageset="TaharezLook" image="windows2leftmiddle" dimension="Width" />
</DimOperator>
</UnifiedDim>
</Dim>
<Dim type="BottomEdge" >
<UnifiedDim scale="1" type="BottomEdge">
<DimOperator op="Subtract">
<ImageDim imageset="TaharezLook" image="windows2middletop" dimension="Height" />
</DimOperator>
</UnifiedDim>
</Dim>
</Area>
</NamedArea>
<Child type="TaharezLook/HorizontalScrollbar" nameSuffix="__auto_hscrollbar__">
<Area>
<Dim type="LeftEdge" ><AbsoluteDim value="0" /></Dim>
<Dim type="TopEdge" ><AbsoluteDim value="0" /></Dim>
<Dim type="Width" ><UnifiedDim scale="1" offset="-12" type="Width" /></Dim>
<Dim type="Height" ><AbsoluteDim value="12" /></Dim>
</Area>
<VertAlignment type="BottomAligned" />
</Child>
<Child type="TaharezLook/VerticalScrollbar" nameSuffix="__auto_vscrollbar__">
<Area>
<Dim type="LeftEdge" ><AbsoluteDim value="0" /></Dim>
<Dim type="TopEdge" ><AbsoluteDim value="0" /></Dim>
<Dim type="Width" ><AbsoluteDim value="12" /></Dim>
<Dim type="Height" ><UnifiedDim scale="1" offset="-12" type="Height" /></Dim>
</Area>
<HorzAlignment type="RightAligned" />
</Child>
<ImagerySection name="OpenTreeButton">
<ImageryComponent>
<Area>
<Dim type="LeftEdge"><AbsoluteDim value="0" /></Dim>
<Dim type="TopEdge"><AbsoluteDim value="0" /></Dim>
<Dim type="RightEdge"><UnifiedDim scale="1" type="RightEdge" /></Dim>
<Dim type="BottomEdge"><UnifiedDim scale="1" type="BottomEdge" /></Dim>
</Area>
<Image imageset="TaharezLook" image="TreeListClosed" />
<VertFormat type="Stretched" />
<HorzFormat type="Stretched" />
</ImageryComponent>
</ImagerySection>
<ImagerySection name="CloseTreeButton">
<ImageryComponent>
<Area>
<Dim type="LeftEdge"><AbsoluteDim value="0" /></Dim>
<Dim type="TopEdge"><AbsoluteDim value="0" /></Dim>
<Dim type="RightEdge"><UnifiedDim scale="1" type="RightEdge" /></Dim>
<Dim type="BottomEdge"><UnifiedDim scale="1" type="BottomEdge" /></Dim>
</Area>
<Image imageset="TaharezLook" image="TreeListOpened" />
<VertFormat type="Stretched" />
<HorzFormat type="Stretched" />
</ImageryComponent>
</ImagerySection>
<StateImagery name="Enabled">
<Layer>
<Section look="NewData/StaticShared1" section="Noframe">
<Colours topLeft="FF7F7F7F" topRight="FF7F7F7F" bottomLeft="FF7F7F7F" bottomRight="FF7F7F7F" />
</Section>
</Layer>
</StateImagery>
<StateImagery name="Disabled">
<Layer>
<Section look="NewData/StaticShared1" section="Noframe">
<Colours topLeft="FF7F7F7F" topRight="FF7F7F7F" bottomLeft="FF7F7F7F" bottomRight="FF7F7F7F" />
</Section>
</Layer>
</StateImagery>
</WidgetLook>
TaharezLookSkin.scheme:
<FalagardMapping WindowType="TaharezLook/Tree" TargetType="CEGUI/Tree" Renderer="Falagard/Tree" LookNFeel="TaharezLook/Tree" />
CEGUI.log:
13/06/2009 19:56:31 (Error) Exception: WindowFactoryManager::getFactory - A WindowFactory object, an alias, or mapping for 'CEGUI/Tree' Window objects is not registered with the system.
...
13/06/2009 19:56:31 (Error) Exception: GUILayout_xmlHandler::startElement - layout loading has been aborted since no WindowFactory is available for 'TaharezLook/Tree' objects.
...
why not :"WindowFactory for 'CEGUI/Tree' windows added."?
what am I missing?
Thanks a lot
I'm currently having a problem with Tree.
Whenever I add one to my layout it bombs out. However, the samples work just fine.
main.layout:
<Window Type="TaharezLook/FrameWindow" Name="MyWindow">
<Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
<Property Name="UnifiedMinSize" Value="{{0,128},{0,128}}" />
<Property Name="UnifiedSize" Value="{{0.5,0},{0.8,0}}" />
<Property Name="Text" Value="Tree Demo" />
<Property Name="CloseButtonEnabled" Value="False" />
<Property Name="SizingEnabled" Value="True" />
<Property Name="FrameEnabled" Value="True" />
<Property Name="RollUpEnabled" Value="True" />
<Property Name="SizingBorderThickness" Value="8.0" />
<Window Type="TaharezLook/Tree" Name="MyTree">
<Property Name="ID" Value="1" />
<Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
<Property Name="UnifiedSize" Value="{{0.96,0},{0.75,0}}" />
<Property Name="UnifiedPosition" Value="{{0.02,0},{0.1,0}}" />
</Window>
</Window>
TaharezLook.looknfeel:
<!--
***************************************************
TaharezLook/Tree
***************************************************
-->
<WidgetLook name="TaharezLook/Tree">
<PropertyDefinition name="SelectionBrushImage" initialValue="set:TaharezLook image:selectico" redrawOnWrite="true" />
<PropertyDefinition name="NormalTextColour" initialValue="FF000000" redrawOnWrite="true" />
<PropertyDefinition name="SelectedTextColour" initialValue="FFFFFFFF" redrawOnWrite="true" />
<PropertyDefinition name="ActiveSelectionColour" initialValue="FF607FFF" redrawOnWrite="true" />
<PropertyDefinition name="InactiveSelectionColour" initialValue="FF808080" redrawOnWrite="true" />
<PropertyDefinition name="FrameColours" initialValue="tl:FFFFFFFF tr:FFFFFFFF bl:FFFFFFFF br:FFFFFFFF" redrawOnWrite="true" />
<NamedArea name="ItemRenderingArea">
<Area>
<Dim type="LeftEdge" ><ImageDim imageset="TaharezLook" image="windows2leftmiddle" dimension="Width" /></Dim>
<Dim type="TopEdge" ><ImageDim imageset="TaharezLook" image="windows2middletop" dimension="Height" /></Dim>
<Dim type="RightEdge" >
<UnifiedDim scale="1" type="RightEdge">
<DimOperator op="Subtract">
<ImageDim imageset="TaharezLook" image="windows2leftmiddle" dimension="Width" />
</DimOperator>
</UnifiedDim>
</Dim>
<Dim type="BottomEdge" >
<UnifiedDim scale="1" type="BottomEdge">
<DimOperator op="Subtract">
<ImageDim imageset="TaharezLook" image="windows2middletop" dimension="Height" />
</DimOperator>
</UnifiedDim>
</Dim>
</Area>
</NamedArea>
<Child type="TaharezLook/HorizontalScrollbar" nameSuffix="__auto_hscrollbar__">
<Area>
<Dim type="LeftEdge" ><AbsoluteDim value="0" /></Dim>
<Dim type="TopEdge" ><AbsoluteDim value="0" /></Dim>
<Dim type="Width" ><UnifiedDim scale="1" offset="-12" type="Width" /></Dim>
<Dim type="Height" ><AbsoluteDim value="12" /></Dim>
</Area>
<VertAlignment type="BottomAligned" />
</Child>
<Child type="TaharezLook/VerticalScrollbar" nameSuffix="__auto_vscrollbar__">
<Area>
<Dim type="LeftEdge" ><AbsoluteDim value="0" /></Dim>
<Dim type="TopEdge" ><AbsoluteDim value="0" /></Dim>
<Dim type="Width" ><AbsoluteDim value="12" /></Dim>
<Dim type="Height" ><UnifiedDim scale="1" offset="-12" type="Height" /></Dim>
</Area>
<HorzAlignment type="RightAligned" />
</Child>
<ImagerySection name="OpenTreeButton">
<ImageryComponent>
<Area>
<Dim type="LeftEdge"><AbsoluteDim value="0" /></Dim>
<Dim type="TopEdge"><AbsoluteDim value="0" /></Dim>
<Dim type="RightEdge"><UnifiedDim scale="1" type="RightEdge" /></Dim>
<Dim type="BottomEdge"><UnifiedDim scale="1" type="BottomEdge" /></Dim>
</Area>
<Image imageset="TaharezLook" image="TreeListClosed" />
<VertFormat type="Stretched" />
<HorzFormat type="Stretched" />
</ImageryComponent>
</ImagerySection>
<ImagerySection name="CloseTreeButton">
<ImageryComponent>
<Area>
<Dim type="LeftEdge"><AbsoluteDim value="0" /></Dim>
<Dim type="TopEdge"><AbsoluteDim value="0" /></Dim>
<Dim type="RightEdge"><UnifiedDim scale="1" type="RightEdge" /></Dim>
<Dim type="BottomEdge"><UnifiedDim scale="1" type="BottomEdge" /></Dim>
</Area>
<Image imageset="TaharezLook" image="TreeListOpened" />
<VertFormat type="Stretched" />
<HorzFormat type="Stretched" />
</ImageryComponent>
</ImagerySection>
<StateImagery name="Enabled">
<Layer>
<Section look="NewData/StaticShared1" section="Noframe">
<Colours topLeft="FF7F7F7F" topRight="FF7F7F7F" bottomLeft="FF7F7F7F" bottomRight="FF7F7F7F" />
</Section>
</Layer>
</StateImagery>
<StateImagery name="Disabled">
<Layer>
<Section look="NewData/StaticShared1" section="Noframe">
<Colours topLeft="FF7F7F7F" topRight="FF7F7F7F" bottomLeft="FF7F7F7F" bottomRight="FF7F7F7F" />
</Section>
</Layer>
</StateImagery>
</WidgetLook>
TaharezLookSkin.scheme:
<FalagardMapping WindowType="TaharezLook/Tree" TargetType="CEGUI/Tree" Renderer="Falagard/Tree" LookNFeel="TaharezLook/Tree" />
CEGUI.log:
13/06/2009 19:56:31 (Error) Exception: WindowFactoryManager::getFactory - A WindowFactory object, an alias, or mapping for 'CEGUI/Tree' Window objects is not registered with the system.
...
13/06/2009 19:56:31 (Error) Exception: GUILayout_xmlHandler::startElement - layout loading has been aborted since no WindowFactory is available for 'TaharezLook/Tree' objects.
...
why not :"WindowFactory for 'CEGUI/Tree' windows added."?
what am I missing?
Thanks a lot