[SOLVED] My looknfeel ProgressBar won't show progress

For help with general CEGUI usage:
- Questions about the usage of CEGUI and its features, if not explained in the documentation.
- Problems with the CMAKE configuration or problems occuring during the build process/compilation.
- Errors or unexpected behaviour.

Moderators: CEGUI MVP, CEGUI Team

pianoman
Just popping in
Just popping in
Posts: 12
Joined: Fri Mar 20, 2009 23:22
Location: Nebraska, USA

[SOLVED] My looknfeel ProgressBar won't show progress

Postby pianoman » Sun Aug 01, 2010 01:57

Hi, I created a looknfeel, and my progress bar won't display the bar when I call ProgressBar::setProgress().

My looknfeel is:

Code: Select all


    <WidgetLook name="TFLook/ProgressBar">
   
        <NamedArea name="ProgressArea">
            <Area>
                <Dim type="LeftEdge" ><AbsoluteDim value="8" /></Dim>
                <Dim type="TopEdge" ><AbsoluteDim value="4" /></Dim>
                <Dim type="RightEdge" >
                    <UnifiedDim scale="1" type="RightEdge">
                        <DimOperator op="Subtract"><AbsoluteDim value="8" /></DimOperator>
                    </UnifiedDim>
                </Dim>
                <Dim type="BottomEdge" >
                    <UnifiedDim scale="1" type="BottomEdge">
                        <DimOperator op="Subtract"><AbsoluteDim value="4" /></DimOperator>
                    </UnifiedDim>
                </Dim>
            </Area>
        </NamedArea>
        <ImagerySection name="frame">
            <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="TFLook" image="lvlProgContainerLeft" />
                <Image type="RightEdge" imageset="TFLook" image="lvlProgContainerRight" />
                <Image type="Background" imageset="TFLook" image="lvlProgContainerMiddle" />
            </FrameComponent>
        </ImagerySection>
        <ImagerySection name="bar" >
      <!--
            <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="TaharezLook" image="lvlProgBarMiddle" />
                <VertFormat type="Stretched" />
                <HorzFormat type="Stretched" />
            </ImageryComponent>
         -->
            <FrameComponent>
                <Area>
               <AreaProperty name="ProgressArea" />
            </Area>
                <Image type="LeftEdge" imageset="TFLook" image="progCtrlBarLeft" />
                <Image type="RightEdge" imageset="TFLook" image="progCtrlBarRight" />
                <Image type="Background" imageset="TFLook" image="progCtrlBarMiddle" />
            </FrameComponent>
        </ImagerySection>
        <StateImagery name="Enabled">
            <Layer>
                <Section section="frame" />
                <Section section="bar" />
            </Layer>
        </StateImagery>
        <StateImagery name="Disabled">
            <Layer>
                <Section section="frame">
                    <Colours topLeft="7FFFFFFF" topRight="7FFFFFFF" bottomLeft="7FFFFFFF" bottomRight="7FFFFFFF" />
                </Section>
                <Section section="bar" />
            </Layer>
        </StateImagery>
        <StateImagery name="EnabledProgress">
            <Layer>
                <Section section="bar" />
            </Layer>
        </StateImagery>
        <StateImagery name="DisabledProgress">
            <Layer>
                <Section section="bar">
                    <Colours topLeft="7FFFFFFF" topRight="7FFFFFFF" bottomLeft="7FFFFFFF" bottomRight="7FFFFFFF" />
                </Section>
            </Layer>
        </StateImagery>
    </WidgetLook>


I see no errors in the CEGUI log file. The progress bar's frame does show up, just not the bar inside.
Last edited by pianoman on Sun Aug 01, 2010 03:41, edited 1 time in total.

pianoman
Just popping in
Just popping in
Posts: 12
Joined: Fri Mar 20, 2009 23:22
Location: Nebraska, USA

[SOLVED] My looknfeel ProgressBar won't show progress

Postby pianoman » Sun Aug 01, 2010 03:41

Works now: just had to put the frame only in the Enabled state and the bar only in the EnabledProgress. :)


Return to “Help”

Who is online

Users browsing this forum: No registered users and 5 guests