Page 1 of 1

A question regarding the update to 0.8.x

Posted: Mon Aug 05, 2013 02:32
by Jefferian
Well, i'm updating my project in order to use Cegui 0.8 and its functionalities (mainly to solve this issue in an efficent way.
I've got a question unrelated to that one, though. Namely, aside from the syntax ones, have there been changes on the looknfeel operators?
I'll explain myself better. I have a button. Its appearance has changed between the two versions. I've edited the files manually (the migrate utility wasn't able to recognize the file versions) to update the syntax changes until it worked again. Beside those changes, i've also substituted the xml_schemas with the most recent ones, assuming it was required (was i wrong perhaps).
Except it doesn't work as it is supposed to do. By testing a bit i've been able to understand that despite the operators used in the relative ImageryComponent the top-center part stretches out for all the remaining width, covering the top-right part. Something that didn't happen in the old version.
Here is the code got straight from the looknfeel files.
0.7.x version

Code: Select all

<ImagerySection name="normal_imagery">

      <ImageryComponent>
           <Area>
                <Dim type="LeftEdge"><AbsoluteDim value="0" /></Dim>
               <Dim type="TopEdge"><AbsoluteDim value="0" /></Dim>
                <Dim type="Width"><UnifiedDim scale="1" type="Width" /></Dim>
                <Dim type="Height"><UnifiedDim scale="1" type="Height" /></Dim>
           </Area>
           <Image imageset="AwaLook" image="ButtonTopLeftNormal" />
           <HorzFormat type="LeftAligned" />
         <VertFormat type="TopAligned" />
      </ImageryComponent>
   
      <ImageryComponent>
           <Area>
                <Dim type="LeftEdge"><AbsoluteDim value="0" /></Dim>
               <Dim type="TopEdge"><AbsoluteDim value="0" /></Dim>
                <Dim type="Width"><UnifiedDim scale="1" type="Width" /></Dim>
                <Dim type="Height"><UnifiedDim scale="1" type="Height" /></Dim>
           </Area>
         
           <Image imageset="AwaLook" image="ButtonTopRightNormal" />
           <HorzFormat type="RightAligned" />
         <VertFormat type="TopAligned" />

      </ImageryComponent>
   
      <ImageryComponent>
           <Area>
                <Dim type="LeftEdge">
            <ImageDim
                       imageset="AwaLook"      
                       image="ButtonTopLeftNormal"
                       dimension="Width"
                  />
            </Dim>
               <Dim type="TopEdge"><AbsoluteDim value="0" /></Dim>
                <Dim type="RightEdge">
            <UnifiedDim scale="1" type="Width">
                       <DimOperator op="Subtract">
                            <ImageDim
                                 imageset="AwaLook"
                                 image="ButtonTopRightNormal"
                                 dimension="Width"
                            />
                       </DimOperator>
                  </UnifiedDim>
            </Dim>
                <Dim type="Height"><UnifiedDim scale="1" type="Height" /></Dim>
           </Area>
         
           <Image imageset="AwaLook" image="ButtonTopNormal" />
         <HorzFormat type="Stretched" />
           <VertFormat type="TopAligned" />

      </ImageryComponent>

      <ImageryComponent>
           <Area>
            <Dim type="LeftEdge"><AbsoluteDim value="0" /></Dim>
               <Dim type="TopEdge"><AbsoluteDim value="0" /></Dim>
            <Dim type="Width"><UnifiedDim scale="1" type="Width" /></Dim>
            <Dim type="Height"><UnifiedDim scale="1" type="Height" /></Dim>
           </Area>
           <Image imageset="AwaLook" image="ButtonBottomNormal" />
         <VertFormat type="BottomAligned" />
           <HorzFormat type="Stretched" />
      </ImageryComponent>
      
      <ImageryComponent>
           <Area>
            <Dim type="LeftEdge"><AbsoluteDim value="0" /></Dim>
               <Dim type="TopEdge">
            <ImageDim
                       imageset="AwaLook"      
                       image="ButtonTopNormal"
                       dimension="Height"
                  />
            </Dim>
            <Dim type="Width"><UnifiedDim scale="1" type="Width" /></Dim>
            <Dim type="BottomEdge">
            <UnifiedDim scale="1" type="Height">
                       <DimOperator op="Subtract">
                            <ImageDim
                                 imageset="AwaLook"
                                 image="ButtonBottomNormal"
                                 dimension="Height"
                            />
                       </DimOperator>
                  </UnifiedDim>
            </Dim>
           </Area>
           <Image imageset="AwaLook" image="ButtonMiddleNormal" />
         <VertFormat type="Stretched" />
           <HorzFormat type="Stretched" />
      </ImageryComponent>
     </ImagerySection>


0.8.x version

Code: Select all

<ImagerySection name="normal_imagery">

      <ImageryComponent>
           <Area>
                <Dim type="LeftEdge"><AbsoluteDim value="0" /></Dim>
               <Dim type="TopEdge"><AbsoluteDim value="0" /></Dim>
                <Dim type="Width"><UnifiedDim scale="1" type="Width" /></Dim>
                <Dim type="Height"><UnifiedDim scale="1" type="Height" /></Dim>
           </Area>
           <Image name="AwaLook/ButtonTopLeftNormal" />
           <HorzFormat type="LeftAligned" />
         <VertFormat type="TopAligned" />
      </ImageryComponent>
   
      <ImageryComponent>
           <Area>
                <Dim type="LeftEdge"><AbsoluteDim value="0" /></Dim>
               <Dim type="TopEdge"><AbsoluteDim value="0" /></Dim>
                <Dim type="Width"><UnifiedDim scale="1" type="Width" /></Dim>
                <Dim type="Height"><UnifiedDim scale="1" type="Height" /></Dim>
           </Area>
         
           <Image name="AwaLook/ButtonTopRightNormal" />
           <HorzFormat type="RightAligned" />
         <VertFormat type="TopAligned" />

      </ImageryComponent>
   
      <ImageryComponent>
           <Area>
                <Dim type="LeftEdge">
            <ImageDim
                       name="AwaLook/ButtonTopLeftNormal"
                       dimension="Width"
                  />
            </Dim>
               <Dim type="TopEdge"><AbsoluteDim value="0" /></Dim>
                <Dim type="RightEdge">
            <UnifiedDim scale="1" type="Width">
                       <OperatorDim op="Subtract">
                            <ImageDim
                                 name="AwaLook/ButtonTopRightNormal"
                                 dimension="Width"
                            />
                       </OperatorDim>
                  </UnifiedDim>
            </Dim>
                <Dim type="Height"><UnifiedDim scale="1" type="Height" /></Dim>
           </Area>
         
           <Image name="AwaLook/ButtonTopNormal" />
         <HorzFormat type="Stretched" />
           <VertFormat type="TopAligned" />

      </ImageryComponent>

      <ImageryComponent>
           <Area>
            <Dim type="LeftEdge"><AbsoluteDim value="0" /></Dim>
               <Dim type="TopEdge"><AbsoluteDim value="0" /></Dim>
            <Dim type="Width"><UnifiedDim scale="1" type="Width" /></Dim>
            <Dim type="Height"><UnifiedDim scale="1" type="Height" /></Dim>
           </Area>
           <Image name="AwaLook/ButtonBottomNormal" />
         <VertFormat type="BottomAligned" />
           <HorzFormat type="Stretched" />
      </ImageryComponent>
      
      <ImageryComponent>
           <Area>
            <Dim type="LeftEdge"><AbsoluteDim value="0" /></Dim>
               <Dim type="TopEdge">
            <ImageDim
                       name="AwaLook/ButtonTopNormal"
                       dimension="Height"
                  />
            </Dim>
            <Dim type="Width"><UnifiedDim scale="1" type="Width" /></Dim>
            <Dim type="BottomEdge">
            <UnifiedDim scale="1" type="Height">
                       <OperatorDim op="Subtract">
                            <ImageDim
                                 name="AwaLook/ButtonBottomNormal"
                                 dimension="Height"
                            />
                       </OperatorDim>
                  </UnifiedDim>
            </Dim>
           </Area>
           <Image name="AwaLook/ButtonMiddleNormal" />
         <VertFormat type="Stretched" />
           <HorzFormat type="Stretched" />
      </ImageryComponent>
     </ImagerySection>


Slightly zoomed graphical comparison
Image

Cegui's log essential section - i doubt it will be actually needed but i'll post it anyway.

Code: Select all

      ********************************************************************************
    * -------- START OF ESSENTIAL SECTION TO BE POSTED ON THE FORUM       -------- *
    ********************************************************************************
    ---- Version: 0.8.2 (Build: Jun 24 2013 Debug Microsoft Windows MSVC++ 11.0 32 bit) ----
    ---- Renderer module is: CEGUI::OgreRenderer - Official OGRE based 2nd generation renderer module. ----
    ---- XML Parser module is: CEGUI::RapidXMLParser - Official RapidXML based parser module for CEGUI ----
    ---- Image Codec module is: OgreImageCodec - Integrated ImageCodec using the Ogre engine. ----
    ---- Scripting module is: None ----


The only warnings i get in the log file. I don't even think they're actually related to the issue.

Code: Select all

(Warn)   Property 'HorzExtent' is not writable so it's implicitly banned from XML. No need to ban it manually
(Warn)   Property 'VertExtent' is not writable so it's implicitly banned from XML. No need to ban it manually


Thanks in advance for the help.