Page 1 of 1

WindowsLook ProgressBar Background question

Posted: Fri May 14, 2010 05:45
by jasonjzz
I want use ProgressBar make Player HPBar .But come up against difficulties.

the ProgressBar's Background has color.

When I set the Background at .imageset file the alpha area.Now the ProgressBar Foreground Color unseen.

Code: Select all

<Image imageset="WindowsLook" image="BackHP" />   //the BackHP at the .imageset file alpha area.
                <Colours topLeft="FFFFFFFF" topRight="FFFFFFFF" bottomLeft="FFFFFFFF" bottomRight="FFFFFFFF" />
                <VertFormat type="Stretched" />
                <HorzFormat type="Stretched" />
            </ImageryComponent>
        </ImagerySection>
        <ImagerySection name="progress_lights" >
            <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="WindowsLook" image="BackHP" /> //the BackHP at the .imageset file alpha area.
                <VertFormat type="Stretched" />
                <HorzFormat type="Stretched" />
            </ImageryComponent>
        </ImagerySection>
        <StateImagery name="Enabled">
            <Layer>
                <Section section="frame" />
            </Layer>
        </StateImagery>
        <StateImagery name="Disabled">
            <Layer>
                <Section section="frame" />
            </Layer>
        </StateImagery>
        <StateImagery name="EnabledProgress">
            <Layer>
                <Section section="progress_lights">
                    <Colours topLeft="FF990000" topRight="FF990000" bottomLeft="FF990000" bottomRight="FF990000" />
                </Section>
            </Layer>
        </StateImagery>
        <StateImagery name="DisabledProgress">
            <Layer>
                <Section section="progress_lights">
                    <Colours topLeft="FF990000" topRight="FF990000" bottomLeft="FF990000" bottomRight="FF990000" />
                </Section>
            </Layer>
        </StateImagery>




How to do?

thanks!

Re: WindowsLook ProgressBar Background question

Posted: Fri May 14, 2010 06:23
by jasonjzz
hahahah :P I know how do it.

Code: Select all

<WidgetLook name="WindowsLook/HealthBar">
        <Property name="HorizontalProgress" value="True" />
        <NamedArea name="ProgressArea">
             <Area>
                <Dim type="LeftEdge" >
                    <ImageDim imageset="WindowsLook" image="StaticFrameLeft" dimension="Width" />
                </Dim>
                <Dim type="TopEdge" >
                    <ImageDim imageset="WindowsLook" image="StaticFrameTop" dimension="Height" />
                </Dim>
                <Dim type="RightEdge" >
                    <UnifiedDim scale="1.0" type="RightEdge">
                        <DimOperator op="Subtract">
                            <ImageDim imageset="WindowsLook" image="StaticFrameRight" dimension="Width" />
                        </DimOperator>
                    </UnifiedDim>
                </Dim>
                <Dim type="BottomEdge" >
                    <UnifiedDim scale="1.0" type="BottomEdge">
                        <DimOperator op="Subtract">
                            <ImageDim imageset="WindowsLook" image="StaticFrameBottom" dimension="Height" />
                        </DimOperator>
                    </UnifiedDim>
                </Dim>
            </Area>

        </NamedArea>
        <ImagerySection name="background">
            <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="WindowsLook" image="BackHP" />
                <VertFormat type="Stretched" />
                <HorzFormat type="Stretched" />
            </ImageryComponent>
        </ImagerySection>   
        <ImagerySection name="progress" >
            <ImageryComponent>
                <Area>
                    <Dim type="LeftEdge" ><UnifiedDim scale="0" type="LeftEdge" /></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="WindowsLook" image="CloseButtonNormal" />
                <VertFormat type="Stretched" />
                <HorzFormat type="Stretched" />
            </ImageryComponent>
        </ImagerySection>
        <StateImagery name="Enabled">
            <Layer>
                <Section section="background" />
            </Layer>
        </StateImagery>
        <StateImagery name="EnabledProgress">
            <Layer>
                <Section section="progress" />
            </Layer>
        </StateImagery>
        <StateImagery name="Disabled" />
        <StateImagery name="DisabledProgress" />
    </WidgetLook>




but now the ProgressBar no border. I want add a border for it. how do it???????

Re: WindowsLook ProgressBar Background question

Posted: Fri May 14, 2010 06:27
by jasonjzz
hahahahahah :pint: All things is OK now!!!!! :hammer:

thanks CE. thanks strong CEGUI system.
thanks very much!!!