Author Topic: Changing child parent but still affected by parent's alpha  (Read 4274 times)

kittikun

  • Newbie
  • *
  • Thank You
  • -Given: 2
  • -Receive: 5
  • Posts: 46
    • View Profile
Changing child parent but still affected by parent's alpha
« on: February 23, 2014, 10:02:13 AM »
Hi,

I found out a strange bug with children alpha.

I am building a widget that contains items as children. When the user select one one the items, I change that item parent and fade the panel alpha.

The selected item is not related to the widget anymore but it's alpha will still change as if it was still a children.
The strange thing is that if I pause the game and manually edit the children alpha from the editor, the correct result will be updated.

Is there something I should do to notigy NGUI that the item parent has changed ?

I am just changing the transform parent for now.

Thank you

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Changing child parent but still affected by parent's alpha
« Reply #1 on: February 23, 2014, 12:43:47 PM »
UIRect.ParentHasChanged notification.

kittikun

  • Newbie
  • *
  • Thank You
  • -Given: 2
  • -Receive: 5
  • Posts: 46
    • View Profile
Re: Changing child parent but still affected by parent's alpha
« Reply #2 on: February 23, 2014, 09:28:31 PM »
Perfect, thanks!