Author Topic: Nested alpha, feature or bug?  (Read 1736 times)

mathiassoeholm

  • Newbie
  • *
  • Thank You
  • -Given: 1
  • -Receive: 4
  • Posts: 35
    • View Profile
Nested alpha, feature or bug?
« on: April 30, 2014, 08:03:02 AM »
Hi there!

I recently encountered some funky behaviour when nesting widgets.



So in the above image.
"b" is a child of "a".
"b" should be 100% opaque since the alpha component of it's color is 255.
But as a result of being a child of "a", it inherits the alpha.
The same is true for the label "d", which is also a child of "a".

This behaviour was a bit unexpected, but maybe it's intentional?

Thanks! :-)

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Nested alpha, feature or bug?
« Reply #1 on: April 30, 2014, 05:34:46 PM »
Alpha is nested. This is intentional. And it's not just for widgets -- panels too. It's so in order to fade out a widget, you only need to adjust one value, not tween alpha on every single one of its children.

mathiassoeholm

  • Newbie
  • *
  • Thank You
  • -Given: 1
  • -Receive: 4
  • Posts: 35
    • View Profile
Re: Nested alpha, feature or bug?
« Reply #2 on: May 01, 2014, 02:21:50 AM »
Got it.. Thanks! :-)