Page 1 of 1

[SOLVED] Vertical Progressbar with smooth endings

Posted: Sun Dec 11, 2011 23:29
by BrightBit
Hello CEGUI community,

I created a vertical progressbar by defining an imageset, a looknfeel file and a corresponding scheme file but the result doesn't look as I was hoping for. I hope the following image will explain what I am looking for:

Image

How can I achieve this?


Greetings
BrightBit

Solution

Posted: Mon Dec 19, 2011 13:44
by BrightBit
Hello CEGUI community,

I solved the issue on my own. I had to use DimOperatos for the ImagerySection of the "progressing" part of the ProgressBar to achieve the desired effect:

Code: Select all

<ImagerySection name="progress">
                <FrameComponent>
                        <Area>
                                <Dim type="LeftEdge" ><AbsoluteDim value="0" /></Dim>
                                <Dim type="TopEdge" >
                                        <UnifiedDim scale="1" type="TopEdge">
                                                <DimOperator op="Subtract">
                                                        <UnifiedDim scale="1" type="TopEdge">
                                                                <DimOperator op="Multiply">
                                                                        <PropertyDim name="CurrentProgress" />
                                                                </DimOperator>
                                                        </UnifiedDim>
                                                </DimOperator>
                                        </UnifiedDim>
                                </Dim>
                                <Dim type="Width" ><UnifiedDim scale="1" type="Width" /></Dim>
                                <Dim type="Height">
                                        <UnifiedDim scale="1" type="Height">
                                                <DimOperator op="Multiply">
                                                        <PropertyDim name="CurrentProgress" />
                                                </DimOperator>
                                        </UnifiedDim>
                                </Dim>
                        </Area>
                        <Image type="TopEdge" imageset="BNBWidgets" image="HealthBarTop" />
                        <Image type="Background" imageset="BNBWidgets" image="HealthBarMiddle" />
                        <Image type="BottomEdge" imageset="BNBWidgets" image="HealthBarBottom" />
                </FrameComponent>
</ImagerySection>



Greetings
BrightBit