Tasharen Entertainment Forum

Support => NGUI 3 Support => Topic started by: ciaravoh on February 12, 2014, 05:34:41 PM

Title: scrollview : how to identify which item is selected
Post by: ciaravoh on February 12, 2014, 05:34:41 PM
Hello,

I have a scroll view with some items, centered. I need to know which Item is selected. How should I perform this ?

thank you.

Hervé
Title: Re: scrollview : how to identify which item is selected
Post by: ArenMook on February 13, 2014, 12:38:51 AM
UICenterOnChild.centeredObject tells you just that, if you're actually using that script. If not, then you need to do some math -- and I would recommend looking inside UICenterOnChild.Recenter function, as it performs that math inside.
Title: Re: scrollview : how to identify which item is selected
Post by: ciaravoh on February 13, 2014, 06:18:08 AM
Thank you. I will give it a try.
Regards,
Hervé