Author Topic: Make a UIScrollView with "Centering" like Windows Explorer file browser  (Read 2018 times)

HoJo

  • Newbie
  • *
  • Thank You
  • -Given: 1
  • -Receive: 0
  • Posts: 1
    • View Profile
I'm not too experienced with NGUI yet but I don't see an easy way to do this. I'm going to have a UI which does not have a mouse cursor. A scrollview in the UI has a list of items, and you can use select previous/next to navigate it. I basically want it to operate exactly like a Windows file browser.

Gif of behaviour I want to recreate, I am pressing up/down arrows:
http://gyazo.com/8dd5c8b81d250fddd4d58284c7139d41

I don't mind doing my own tests/experimenting/writing my own code, but - time is always precious - any tips you might have to pursue this would be appreciated!

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Make a UIScrollView with "Centering" like Windows Explorer file browser
« Reply #1 on: August 26, 2014, 03:04:24 AM »
Easiest thing to do would be to not use a scroll view here. For something like this you have a fixed number of entries that fit on the screen. Say 8 rows. Keep track of which one is selected. When you press Up arrow with the top one selected, update the text of all your 8 labels "scrolling" up.