Tasharen Entertainment Forum

Support => NGUI 3 Support => Topic started by: jeldrez on September 24, 2013, 09:05:36 AM

Title: UICenterOnChild 'set centeredObject'
Post by: jeldrez on September 24, 2013, 09:05:36 AM
There's anyway to set centeredObject in the UIGrid?

For example, it's an inventory and I want to show selected the equipped item. The way I see to do this is to set CenteredObject, but only gets.

Thanks!
Title: Re: UICenterOnChild 'set centeredObject'
Post by: jeldrez on September 24, 2013, 01:21:08 PM
I tried moving the UIPanel to the pos of the current item, but it's moving the clipping area too. Can I change by scripting the clipping offset?
Is this the best way to do this?
Title: Re: UICenterOnChild 'set centeredObject'
Post by: ArenMook on September 24, 2013, 01:40:13 PM
Check the skyrim UI example in the useful stuff sticky. You use SpringPanel to position the panel's content on the object of your choice.
Title: Re: UICenterOnChild 'set centeredObject'
Post by: jeldrez on September 26, 2013, 12:31:14 PM
Thanks Aren, at the end I used MoveRelative.