1. In FrameComponent::render_impl(), the clipper is used when rendering the background, but is not used when rendering the other images, the 'frame'.
2. In FalProgressBar::render(), I think progressRect and progressClipper should swap.
Now a ProgressBar which 'progress_light' contains a frame looks strange.
BUG? FrameComponent and ProgressBar
Moderators: CEGUI MVP, CEGUI Team
- CrazyEddie
- CEGUI Project Lead
- Posts: 6760
- Joined: Wed Jan 12, 2005 12:06
- Location: England
- Contact:
Re: BUG? FrameComponent and ProgressBar
Hi,
Thanks for the info - sounds bug-like; I'll test it out (no fixes 'till after 0.7.1 though).
CE.
Thanks for the info - sounds bug-like; I'll test it out (no fixes 'till after 0.7.1 though).
CE.
Useful Links: Forum Guidelines | Documentation | Tutorials | HOWTO | Videos | Donate to CEGUI | CEGUI Twitter
Re: BUG? FrameComponent and ProgressBar
I think over and find there is two kinds of 'FrameComponent in ProgressBar'. Suppose here is a ProgressBar's background
bbbbbbbbbbbb
bbbbbbbbbbbb
bbbbbbbbbbbb
and here is a Frame
xxxxxxxxxxxx
xoooooooooox
xxxxxxxxxxxx
When the progress is 50%,which shound the bar looks like?
xxxxxxbbbbbb
xooooobbbbbb
xxxxxxbbbbbb
or
xxxxxxbbbbbb
xooooxbbbbbb
xxxxxxbbbbbb
I want the second one, but I think the first one is also useful somewhere. Which does CEGUI support? Or both, how to specify them?
bbbbbbbbbbbb
bbbbbbbbbbbb
bbbbbbbbbbbb
and here is a Frame
xxxxxxxxxxxx
xoooooooooox
xxxxxxxxxxxx
When the progress is 50%,which shound the bar looks like?
xxxxxxbbbbbb
xooooobbbbbb
xxxxxxbbbbbb
or
xxxxxxbbbbbb
xooooxbbbbbb
xxxxxxbbbbbb
I want the second one, but I think the first one is also useful somewhere. Which does CEGUI support? Or both, how to specify them?
- CrazyEddie
- CEGUI Project Lead
- Posts: 6760
- Joined: Wed Jan 12, 2005 12:06
- Location: England
- Contact:
Re: BUG? FrameComponent and ProgressBar
Both of these scenarios are possible and what gets drawn and how is controlled in the looknfeel specifications. Basically, the imagery specified under the EnabledProgress and DisabledProgress StateImagery parts is drawn into the area specified in the ProgressArea NamedArea, and - crucially - clipped at a point determined by scaling by the current progress. Since you do not want the clipping, all you need to do is scale the areas for the progress imagery by the current progress (i.e. setting the right edge to coincide with the right edge of the clipping area - thus, the imagery is drawn unclipped).
For example, you might have an imagery section named "progress_imagery", and define it as such:
The important part is where the width is multiplied by the current progress value, here:
HTH
CE.
For example, you might have an imagery section named "progress_imagery", and define it as such:
Code: Select all
<ImagerySection name="progress_imagery" >
<FrameComponent>
<Area>
<Dim type="LeftEdge" ><AbsoluteDim value="0" /></Dim>
<Dim type="TopEdge" ><AbsoluteDim value="0" /></Dim>
<Dim type="Width" >
<UnifiedDim scale="1" type="Width">
<DimOperator op="Multiply">
<PropertyDim name="CurrentProgress" />
</DimOperator>
</UnifiedDim>
</Dim>
<Dim type="Height" ><UnifiedDim scale="1" type="Height" /></Dim>
</Area>
<Image type="TopLeftCorner" imageset="AnImageset" image="FrameTopLeft" />
<Image type="TopRightCorner" imageset="AnImageset" image="FrameTopRight" />
<Image type="BottomLeftCorner" imageset="AnImageset" image="FrameBottomLeft" />
<Image type="BottomRightCorner" imageset="AnImageset" image="FrameBottomRight" />
<Image type="LeftEdge" imageset="AnImageset" image="FrameLeft" />
<Image type="TopEdge" imageset="AnImageset" image="FrameTop" />
<Image type="RightEdge" imageset="AnImageset" image="FrameRight" />
<Image type="BottomEdge" imageset="AnImageset" image="FrameBottom" />
<Image type="Background" imageset="AnImageset" image="FrameMiddle" />
</FrameComponent>
</ImagerySection>
The important part is where the width is multiplied by the current progress value, here:
Code: Select all
<Dim type="Width" >
<UnifiedDim scale="1" type="Width">
<DimOperator op="Multiply">
<PropertyDim name="CurrentProgress" />
</DimOperator>
</UnifiedDim>
</Dim>
HTH
CE.
Useful Links: Forum Guidelines | Documentation | Tutorials | HOWTO | Videos | Donate to CEGUI | CEGUI Twitter
Return to “Bug Reports, Suggestions, Feature Requests”
Who is online
Users browsing this forum: No registered users and 3 guests