extend ImageProperty label of looknfeel

Forum for general chit-chat or off-topic discussion.

Moderators: CEGUI MVP, CEGUI Team

koria
Just popping in
Just popping in
Posts: 17
Joined: Mon May 19, 2008 09:16

extend ImageProperty label of looknfeel

Postby koria » Thu Mar 05, 2009 03:35

when we create a looknfeel file.
we extend the "ImageProperty " label function
here this like:
old looknfeel :

Code: Select all

<ImagerySection name="hover">
            <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="ButtonLeftHighlight" />
                <Image type="RightEdge" imageset="TaharezLook" image="ButtonRightHighlight" />
                <Image type="Background" imageset="TaharezLook" image="ButtonMiddleHighlight" />
            </FrameComponent>
            <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>
                <ImageProperty name="HoverImage" />
                <VertFormatProperty name="VertImageFormatting" />
                <HorzFormatProperty name="HorzImageFormatting" />
            </ImageryComponent>
        </ImagerySection>


new looknfeel code :

Code: Select all

<ImagerySection name="hover">
            <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>
                <ImageProperty type="LeftEdge" name="LeftEdgeFrameImage" />

              <ImageProperty type="RightEdge" name="RightEdgeFrameImage" />
              <ImageProperty type="BackGround" name="BackgroundFrameImage" />
            </FrameComponent>
            <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>
                <ImageProperty name="HoverImage" />
                <VertFormatProperty name="VertImageFormatting" />
                <HorzFormatProperty name="HorzImageFormatting" />
            </ImageryComponent>
        </ImagerySection>


u can see .

Code: Select all

 <Image type="LeftEdge" imageset="TaharezLook" image="ButtonLeftHighlight" />
                <Image type="RightEdge" imageset="TaharezLook" image="ButtonRightHighlight" />
                <Image type="Background" imageset="TaharezLook" image="ButtonMiddleHighlight" />

change to

Code: Select all

<ImageProperty type="LeftEdge" name="LeftEdgeFrameImage" />

              <ImageProperty type="RightEdge" name="RightEdgeFrameImage" />
              <ImageProperty type="BackGround" name="BackgroundFrameImage" />


after do this . u can use property name image to modify FrameComponent 's look

i hope this function code can add into CE's source if you like.

another function is the
<ImagePropertyDim name="TImage" dimension="Height" />

it can get the property "TImage" 's image dimension .

like
<ImageDim imageset="TaharezLook" image="RadioButtonNormal" dimension="Width">

but approve the dim from property image .

if you like this, i hope can give the source to you to add into CE source.

songge3604
Quite a regular
Quite a regular
Posts: 60
Joined: Tue Oct 28, 2008 10:46

Postby songge3604 » Thu Mar 05, 2009 06:21

Yes, we need this to make flexible looknfeel.

Now, we have to make widgets' looknfeel again and again, sometimes they are only different at images!

User avatar
CrazyEddie
CEGUI Project Lead
Posts: 6760
Joined: Wed Jan 12, 2005 12:06
Location: England
Contact:

Postby CrazyEddie » Thu Mar 05, 2009 09:56

Hi,

Yes, please feel free to submit these enhancements to mantis as a patch in unified diff format (no other form is acceptable, since anything else just wastes a lot of my time, so would be ignored :) ).

Thanks in advance :)

CE


Return to “Offtopic Discussion”

Who is online

Users browsing this forum: No registered users and 6 guests