Tasharen Entertainment Forum
Support => NGUI 3 Support => Topic started by: tr1stan on August 28, 2014, 02:42:43 AM
-
Hey guys,
What's the proper strategy to use Key navigation if I'm dealing with scroll view? I have a list of buttons which is dynamically generated at runtime under that scroll view, how can I navigate through those individual buttons with keyboard?
-
Button navigation is simple enough with UIKeyNavigation, but I'm assuming you want to scroll the scroll view as well. Knowing the UICamera.selectedObject you can calculate its position and check -- UIPanel.IsVisible? If not, center the scroll view on that position (easiest, SpringPanel.Begin) or move it in that direction (a bit more difficult).