Page 1 of 1

Problem with CELayoutEditor : created layout cannot be displ

Posted: Mon Nov 28, 2005 22:18
by Ceacy
Hi,
I recently made a layout with CELayout editor, but, when i try to load it, nothing is displayed.
I tried with an "old" layout, without modifying the code : it's displayed. I wonder if the problem isn't the new metrics system (?)

New layout (which causes the problem) :

Code: Select all

<GUILayout>
-
   <Window Type="DefaultWindow" Name="Root">
<Property Name="Alpha" Value="1,000000"/>
<Property Name="AutoRepeatDelay" Value="0,300000"/>
<Property Name="AutoRepeatRate" Value="0,060000"/>
<Property Name="UnifiedAreaRect" Value="{{0,000000,0,000000},{0,000000,0,000000},{1,000000,0,000000},{1,000000,0,000000}}"/>
<Property Name="UnifiedMaxSize" Value="{{1,000000,0,000000},{1,000000,0,000000}}"/>
<Property Name="UnifiedMinSize" Value="{{0,000000,0,000000},{0,000000,0,000000}}"/>
-
   <Window Type="DefaultWindow" Name="inventory">
<Property Name="Alpha" Value="1,000000"/>
<Property Name="AutoRepeatDelay" Value="0,300000"/>
<Property Name="AutoRepeatRate" Value="0,060000"/>
<Property Name="UnifiedAreaRect" Value="{{0,000781,0,000000},{0,006616,0,000000},{0,995898,0,000000},{0,872392,0,000000}}"/>
<Property Name="UnifiedMaxSize" Value="{{1,000000,0,000000},{1,000000,0,000000}}"/>
<Property Name="UnifiedMinSize" Value="{{0,000000,0,000000},{0,000000,0,000000}}"/>
-
   <Window Type="TaharezLook/FrameWindow" Name="main">
<Property Name="Alpha" Value="1,000000"/>
<Property Name="AutoRepeatDelay" Value="0,300000"/>
<Property Name="AutoRepeatRate" Value="0,060000"/>
<Property Name="CaptionColour" Value="00FFFFFF"/>
<Property Name="EWSizingCursorImage" Value="set:TaharezLook image:MouseEsWeCursor"/>
<Property Name="MouseCursorImage" Value="set:TaharezLook image:MouseTarget"/>
<Property Name="NESWSizingCursorImage" Value="set:TaharezLook image:MouseNeSwCursor"/>
<Property Name="NSSizingCursorImage" Value="set:TaharezLook image:MouseNoSoCursor"/>
<Property Name="NWSESizingCursorImage" Value="set:TaharezLook image:MouseNwSeCursor"/>
<Property Name="SizingBorderThickness" Value="8,000000"/>
<Property Name="TitlebarEnabled" Value="True"/>
<Property Name="TitlebarFont" Value="Commonwealth-10"/>
<Property Name="UnifiedAreaRect" Value="{{0,464258,0,000000},{0,196692,0,000000},{0,878320,0,000000},{0,711322,0,000000}}"/>
<Property Name="UnifiedMaxSize" Value="{{1,000000,0,000000},{1,000000,0,000000}}"/>
<Property Name="UnifiedMinSize" Value="{{0,000000,0,000000},{0,000000,0,000000}}"/>
-
   <Window Type="TaharezLook/ComboDropList" Name="item_list">
<Property Name="Alpha" Value="1,000000"/>
<Property Name="AutoRepeatDelay" Value="0,300000"/>
<Property Name="AutoRepeatRate" Value="0,060000"/>
<Property Name="DistributeCapturedInputs" Value="True"/>
<Property Name="MouseCursorImage" Value="set:TaharezLook image:MouseTarget"/>
<Property Name="UnifiedAreaRect" Value="{{0,035377,0,000000},{0,101360,0,000000},{0,967453,0,000000},{0,915884,0,000000}}"/>
<Property Name="UnifiedMaxSize" Value="{{1,000000,0,000000},{1,000000,0,000000}}"/>
<Property Name="UnifiedMinSize" Value="{{0,000000,0,000000},{0,000000,0,000000}}"/>
<Property Name="Visible" Value="False"/>
</Window>
</Window>
-
   <Window Type="TaharezLook/FrameWindow" Name="item_detail">
<Property Name="Alpha" Value="1,000000"/>
<Property Name="AutoRepeatDelay" Value="0,300000"/>
<Property Name="AutoRepeatRate" Value="0,060000"/>
<Property Name="CaptionColour" Value="00FFFFFF"/>
<Property Name="EWSizingCursorImage" Value="set:TaharezLook image:MouseEsWeCursor"/>
<Property Name="MouseCursorImage" Value="set:TaharezLook image:MouseTarget"/>
<Property Name="NESWSizingCursorImage" Value="set:TaharezLook image:MouseNeSwCursor"/>
<Property Name="NSSizingCursorImage" Value="set:TaharezLook image:MouseNoSoCursor"/>
<Property Name="NWSESizingCursorImage" Value="set:TaharezLook image:MouseNwSeCursor"/>
<Property Name="SizingBorderThickness" Value="8,000000"/>
<Property Name="TitlebarEnabled" Value="True"/>
<Property Name="TitlebarFont" Value="Commonwealth-10"/>
<Property Name="UnifiedAreaRect" Value="{{0,118548,0,000000},{0,116238,0,000000},{0,404858,0,000000},{0,542578,0,000000}}"/>
<Property Name="UnifiedMaxSize" Value="{{1,000000,0,000000},{1,000000,0,000000}}"/>
<Property Name="UnifiedMinSize" Value="{{0,000000,0,000000},{0,000000,0,000000}}"/>
-
   <Window Type="TaharezLook/StaticImage" Name="item_picture">
<Property Name="Alpha" Value="1,000000"/>
<Property Name="AutoRepeatDelay" Value="0,300000"/>
<Property Name="AutoRepeatRate" Value="0,060000"/>
<Property Name="BackgroundImage" Value="set:TaharezLook image:StaticBackdrop"/>
<Property Name="BottomFrameImage" Value="set:TaharezLook image:StaticBottom"/>
<Property Name="BottomLeftFrameImage" Value="set:TaharezLook image:StaticBottomLeft"/>
<Property Name="BottomRightFrameImage" Value="set:TaharezLook image:StaticBottomRight"/>
<Property Name="LeftFrameImage" Value="set:TaharezLook image:StaticLeft"/>
<Property Name="RightFrameImage" Value="set:TaharezLook image:StaticRight"/>
<Property Name="TopFrameImage" Value="set:TaharezLook image:StaticTop"/>
<Property Name="TopLeftFrameImage" Value="set:TaharezLook image:StaticTopLeft"/>
<Property Name="TopRightFrameImage" Value="set:TaharezLook image:StaticTopRight"/>
<Property Name="UnifiedAreaRect" Value="{{0,047597,0,000000},{0,147808,0,000000},{0,362403,0,000000},{0,499269,0,000000}}"/>
<Property Name="UnifiedMaxSize" Value="{{1,000000,0,000000},{1,000000,0,000000}}"/>
<Property Name="UnifiedMinSize" Value="{{0,000000,0,000000},{0,000000,0,000000}}"/>
</Window>
-
   <Window Type="TaharezLook/StaticText" Name="item_info">
<Property Name="Alpha" Value="1,000000"/>
<Property Name="AutoRepeatDelay" Value="0,300000"/>
<Property Name="AutoRepeatRate" Value="0,060000"/>
<Property Name="BackgroundImage" Value="set:TaharezLook image:StaticBackdrop"/>
<Property Name="BottomFrameImage" Value="set:TaharezLook image:StaticBottom"/>
<Property Name="BottomLeftFrameImage" Value="set:TaharezLook image:StaticBottomLeft"/>
<Property Name="BottomRightFrameImage" Value="set:TaharezLook image:StaticBottomRight"/>
<Property Name="LeftFrameImage" Value="set:TaharezLook image:StaticLeft"/>
<Property Name="RightFrameImage" Value="set:TaharezLook image:StaticRight"/>
<Property Name="Text" Value="Name : Weight :"/>
<Property Name="TopFrameImage" Value="set:TaharezLook image:StaticTop"/>
<Property Name="TopLeftFrameImage" Value="set:TaharezLook image:StaticTopLeft"/>
<Property Name="TopRightFrameImage" Value="set:TaharezLook image:StaticTopRight"/>
<Property Name="UnifiedAreaRect" Value="{{0,395659,0,000000},{0,149208,0,000000},{0,942403,0,000000},{0,500670,0,000000}}"/>
<Property Name="UnifiedMaxSize" Value="{{1,000000,0,000000},{1,000000,0,000000}}"/>
<Property Name="UnifiedMinSize" Value="{{0,000000,0,000000},{0,000000,0,000000}}"/>
</Window>
-
   <Window Type="TaharezLook/StaticText" Name="item_description">
<Property Name="Alpha" Value="1,000000"/>
<Property Name="AutoRepeatDelay" Value="0,300000"/>
<Property Name="AutoRepeatRate" Value="0,060000"/>
<Property Name="BackgroundImage" Value="set:TaharezLook image:StaticBackdrop"/>
<Property Name="BottomFrameImage" Value="set:TaharezLook image:StaticBottom"/>
<Property Name="BottomLeftFrameImage" Value="set:TaharezLook image:StaticBottomLeft"/>
<Property Name="BottomRightFrameImage" Value="set:TaharezLook image:StaticBottomRight"/>
<Property Name="LeftFrameImage" Value="set:TaharezLook image:StaticLeft"/>
<Property Name="RightFrameImage" Value="set:TaharezLook image:StaticRight"/>
<Property Name="TopFrameImage" Value="set:TaharezLook image:StaticTop"/>
<Property Name="TopLeftFrameImage" Value="set:TaharezLook image:StaticTopLeft"/>
<Property Name="TopRightFrameImage" Value="set:TaharezLook image:StaticTopRight"/>
<Property Name="UnifiedAreaRect" Value="{{0,048837,0,000000},{0,511814,0,000000},{0,943488,0,000000},{0,899086,0,000000}}"/>
<Property Name="UnifiedMaxSize" Value="{{1,000000,0,000000},{1,000000,0,000000}}"/>
<Property Name="UnifiedMinSize" Value="{{0,000000,0,000000},{0,000000,0,000000}}"/>
</Window>
</Window>
</Window>
</Window>
</GUILayout>


Old one (works) :

Code: Select all

<?xml version="1.0" ?>
<GUILayout>
   <Window Type="DefaultWindow" Name="root">
      <Window Type="SamothLook/FrameWindow" Name="Main">
               <Property Name="RelativeMinSize" Value="w:0.2 h:0.2" />
               <Property Name="RelativeMaxSize" Value="w:1.0 h:1.0" />
               <Property Name="Position" Value="x:0.0 y:0.0" />
               <Property Name="Size" Value="w:1.0 h:1.0" />
               <Property Name="Text" Value="Samoth" />
               <Property Name="CloseButtonEnabled" Value="False" />

         <Window Type="SamothLook/Button" Name="cmdQuit">
            <Property Name="Text" Value="Quit" />
                 <Property Name="Position" Value="x:0.4 y:0.7" />
                 <Property Name="Size" Value="w:0.2 h:0.07" />
         </Window>
         <Window Type="SamothLook/Button" Name="cmdOptions">
                 <Property Name="Position" Value="x:0.4 y:0.6" />
                 <Property Name="Size" Value="w:0.2 h:0.07" />
            <Property Name="Text" Value="Options" />
         </Window>
         <Window Type="SamothLook/Button" Name="cmdLaunch">
                 <Property Name="Position" Value="x:0.4 y:0.5" />
                 <Property Name="Size" Value="w:0.2 h:0.07" />
            <Property Name="Text" Value="Launch" />
         </Window>
         </Window>
      </Window>
</GUILayout>


Any hint ?

Thanks,
Ceacy

Re: Problem with CELayoutEditor : created layout cannot be d

Posted: Tue Nov 29, 2005 06:56
by lindquist
If you're using CEGUI 0.3 then that's the reason.
Unified metrics are available from 0.4 and up.

Re: Problem with CELayoutEditor : created layout cannot be d

Posted: Tue Nov 29, 2005 08:26
by Ceacy
I'm using CEGUI 0.4 ; in addition, i didn't see any error in CEGUI.log (even if i set the log level to "insane"). :oops:

Re: Problem with CELayoutEditor : created layout cannot be d

Posted: Thu Dec 01, 2005 21:35
by Ceacy
It seems that Unified dimensions are not handled, but i don't see why. There isn't any clue in the log file, and i've got CEGUI 0.4, so ... is there any option to set, in order to make it work ?

Re: Problem with CELayoutEditor : created layout cannot be d

Posted: Fri Dec 02, 2005 00:05
by lindquist
After a closer look its obviously the huge absolute components of your window's area rects. All windows are thousands of pixels off the screen, and thus clipped.

I'll see if I can reproduce this...

Re: Problem with CELayoutEditor : created layout cannot be d

Posted: Fri Dec 02, 2005 18:23
by Ceacy
Oh ... I finally found the solution. All of this happened because I'm french :wink:
Indeed, for floating-point numbers, I - and my system - use "," instead of dot : e.g, 1.2 => 1,2
And, because of this, floating-point values were written wih commas. "0,000781" means "0.000781", for example : but, during the scheme loading, it was understood as "0, then 000781" (which isn't really the same thing).

Now, it works : I had to replace each "floating-point value comma" by a dot.