Author Topic: how to identify the item index of ngui scrollview.  (Read 7183 times)

ysrikanth2011

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 12
    • View Profile
how to identify the item index of ngui scrollview.
« on: July 22, 2014, 03:21:28 AM »
Hi,

I am having 5 items in a scroll view . I want to know which item I am presently viewing.

Can I find the index of the item which I am currently viewing?



ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: how to identify the item index of ngui scrollview.
« Reply #1 on: July 22, 2014, 09:17:22 PM »
If you used UICenterOnChild, then check UICenterOnChild.centeredObject. If not, then you'd need to do math yourself as there is no concept of "which item you are viewing" in the scroll view.