Tasharen Entertainment Forum

Support => NGUI 3 Support => Topic started by: huminado on February 22, 2013, 09:17:19 PM

Title: calling iTweenMoveTo() to move a panel menu
Post by: huminado on February 22, 2013, 09:17:19 PM
I tried moving a panel upon a button click using iTween.MoveTo().  This was for hiding/re-exposing the panel, but with some associated animation.  It seemed to work fine, except sometimes the buttons on the panel would disappear.

When I made a parent panel, and the original panel a child, and used iTween.MoveTo() to move the parent, this seems to get rid of any bad side-effects.  All the buttons stay in tact.

Is this approach "okay"?  Or am I asking for trouble?
Title: Re: calling iTweenMoveTo() to move a panel menu
Post by: ArenMook on February 23, 2013, 01:13:34 AM
Multiple panels means you need to adjust the transform's Z to determine what's in front of what. It's explained in the FAQ.
Title: Re: calling iTweenMoveTo() to move a panel menu
Post by: huminado on February 26, 2013, 05:27:20 PM
Multiple panels means you need to adjust the transform's Z to determine what's in front of what. It's explained in the FAQ.

Okay - I just found my error.  The Z value indeed changed with the move, which seems to explain the disappearing buttons.  As long as the Z value stays constant the buttons are visible, even without the parenting scheme in my OP.

Thanks!