Alpha questions

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

Fenrir
Just popping in
Just popping in
Posts: 2
Joined: Sun Dec 10, 2006 13:25

Alpha questions

Postby Fenrir » Sun Dec 10, 2006 18:40

Hi all,

here is my problem : I've made a button and I want to change its alpha value when the mouse is hover it, here is what I've made :

Code: Select all

<WidgetLook name="MGT/PanelWindow">
    <ImagerySection name="Frame">
      <FrameComponent>
        <Area>
          <Dim type="LeftEdge">
            <AbsoluteDim value="0" />
          </Dim>
          <Dim type="TopEdge">
            <AbsoluteDim value="0" />
          </Dim>
          <Dim type="RightEdge">
            <UnifiedDim scale="1" type="RightEdge" />
          </Dim>
          <Dim type="BottomEdge">
            <UnifiedDim scale="1" type="BottomEdge" />
          </Dim>
        </Area>
        <Image type="TopLeftCorner" imageset="Frame" image="TopLeftCorner" />
        <Image type="TopRightCorner" imageset="Frame" image="TopRightCorner" />
        <Image type="BottomLeftCorner" imageset="Frame" image="BottomLeftCorner" />
        <Image type="BottomRightCorner" imageset="Frame" image="BottomRightCorner" />
        <Image type="LeftEdge" imageset="Frame" image="LeftEdge" />
        <Image type="TopEdge" imageset="Frame" image="TopEdge" />
        <Image type="RightEdge" imageset="Frame" image="RightEdge" />
        <Image type="BottomEdge" imageset="Frame" image="BottomEdge" />
        <Image type="Background" imageset="Frame" image="Background" />
      </FrameComponent>
    </ImagerySection>

    <StateImagery name="Normal">
      <Layer>
        <Section section="Frame">
          <Property name="Alpha" value="0.5" />
        </Section>
      </Layer>
    </StateImagery>

    <StateImagery name="Hover">
      <Layer>
        <Section section="Frame">
          <Property name="Alpha" value="1.0" />
        </Section>
      </Layer>
    </StateImagery>

    <StateImagery name="Pushed">
      <Layer>
        <Section section="Frame">
          <Property name="Alpha" value="1.0" />
        </Section>
      </Layer>
    </StateImagery>
  </WidgetLook>


But it doesn't work, the alpha value is always the same.
I know that I can do it with the alpha value of the colour assigned to my button, but I want to propagate this alpha value to the children of my button, using :

Code: Select all

        <Property name="inheritsAlpha" value="true" />


Or is it a way to inherit also the colour of the parent to the children ?
Thanks in advance for any help !

Return to “Help”

Who is online

Users browsing this forum: Bing [Bot] and 33 guests