[SOLVED] Vertical Progressbar with smooth endings

Help and discussion regarding skinning, themes, and other artistic content.

Moderators: CEGUI MVP, CEGUI Team

User avatar
BrightBit
Not too shy to talk
Not too shy to talk
Posts: 35
Joined: Mon May 30, 2011 03:30
Contact:

[SOLVED] Vertical Progressbar with smooth endings

Postby BrightBit » Sun Dec 11, 2011 23:29

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
Last edited by BrightBit on Mon Dec 19, 2011 13:44, edited 1 time in total.
"Yeah so if you ever need info about anyone [...] Just ask. [...] They 'trust me'. Dumb fucks." - Mark Zuckerberg (Facebook CEO)

User avatar
BrightBit
Not too shy to talk
Not too shy to talk
Posts: 35
Joined: Mon May 30, 2011 03:30
Contact:

Solution

Postby BrightBit » Mon Dec 19, 2011 13:44

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
"Yeah so if you ever need info about anyone [...] Just ask. [...] They 'trust me'. Dumb fucks." - Mark Zuckerberg (Facebook CEO)


Return to “Skins and Themes”

Who is online

Users browsing this forum: No registered users and 6 guests