Page 1 of 1

Button problem[looknfeel]

Posted: Tue Oct 07, 2008 07:21
by kili
Hi, i hope the ButtonMiddleNormal Tiled in Button component.

so i changed some code in looknfeel:

Code: Select all

<PropertyDefinition name="VertImageFormatting" initialValue="Stretched" redrawOnWrite="true" />
<PropertyDefinition name="HorzImageFormatting" initialValue="Tiled" redrawOnWrite="true" />

...

<ImagerySection name="normal">
   <FrameComponent>
      <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 type="LeftEdge" imageset="TaharezLook" image="ButtonLeftNormal" />
         <Image type="RightEdge" imageset="TaharezLook" image="ButtonRightNormal" />
  </FrameComponent>
  <ImageryComponent>
     <Area>
         <Dim type="LeftEdge" ><ImageDim imageset="TaharezLook" image="ButtonLeftNormal" dimension="Width" /></Dim>
         <Dim type="TopEdge" ><AbsoluteDim value="0" /></Dim>
         <Dim type="RightEdge" >
           <UnifiedDim scale="1" type="RightEdge">
             <DimOperator op="Subtract">
                            <ImageDim imageset="TaharezLook" image="ButtonLeftNormal" dimension="Width" />
                        </DimOperator>
                    </UnifiedDim>
                </Dim>
                    <Dim type="Height" ><UnifiedDim scale="1" type="Height" /></Dim>
                </Area>
                <Image type="Background" imageset="TaharezLook" image="ButtonMiddleNormal" />
                <VertFormatProperty name="VertImageFormatting" />
                <HorzFormatProperty name="HorzImageFormatting" />
            </ImageryComponent>
        </ImagerySection>


and this worked fine using TaharezLook(imageset+tga).
when i replace the images from our artist and opened CELayoutEditor
Image
appeared.

the imageset is:

Code: Select all

<Image Name="ButtonLeftNormal" XPos="85" YPos="9" Width="50" Height="34" />
<Image Name="ButtonMiddleNormal" XPos="137" YPos="9" Width="7" Height="34" />
<Image Name="ButtonRightNormal" XPos="146" YPos="9" Width="43" Height="34" />


is it result in the left and right edge's width longer than the middle?

Posted: Tue Oct 07, 2008 07:36
by scriptkid
Hi,

okay so you only changed the image files, right? My guess would be that some of these files cannot be found or loaded. Is there anything else in the Cegui.log file?

Posted: Tue Oct 07, 2008 10:53
by kili
that seems not because of the files couldn't be found or loaded.

if i only modify TaharezLook.imageset, such as:

Code: Select all

<Image Name="ButtonLeftNormal" XPos="68" YPos="20" Width="70" Height="16" />

(the Width)

the message appears, too.

the log's slice is:

Code: Select all

...
07/10/2008 18:46:07 (Info)    Window 'Demo7/Window3/MLEditbox/HorizontalScrollbar' has been added to dead pool.
07/10/2008 18:46:07 (Info)    Window 'Demo7/Window3/MLEditbox' has been added to dead pool.
07/10/2008 18:46:07 (Info)    Window 'Demo7/Window3' has been added to dead pool.
07/10/2008 18:46:07 (Info)    Window 'root' has been added to dead pool.
07/10/2008 18:46:07 (Info)    Window 'BackgroundImage' has been added to dead pool.

<end of file>


(after i opened Demo7, it crashed.)