Author Topic: Making a list scrollable list  (Read 7019 times)

Darkness

  • Jr. Member
  • **
  • Thank You
  • -Given: 3
  • -Receive: 0
  • Posts: 90
    • View Profile
Making a list scrollable list
« on: October 09, 2014, 01:14:20 AM »
I'm trying to put together windows that have a list of items and information about each item.  For example, going to the blacksmith and checking out his wares.  What is the best way to do this and be able to scroll though the list via keyboard (or controller) and not a mouse?  I started working on this using UIGrid, but I wonder if there is a better way to do this.  But I'm trying to figure out what the best way for moving through the list (vertically) is.  Any ideas?

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Making a list scrollable list
« Reply #1 on: October 10, 2014, 02:16:01 AM »
For scrolling using a keyboard, it's best to use logic similar to what's in UICenterOnClick. If you look at that script, you will see that it's able to reposition the scroll view given a desired position. In your case it would be the same thing -- I'd attach a script to the items inside a scroll view that reacts to OnSelect(true), calling SpringPanel.Begin inside to reposition the scroll view.

Darkness

  • Jr. Member
  • **
  • Thank You
  • -Given: 3
  • -Receive: 0
  • Posts: 90
    • View Profile
Re: Making a list scrollable list
« Reply #2 on: October 22, 2014, 01:31:12 AM »
I'll look into this.  Have you considered adding something like this as a normal widget?  It's a lot of work to get simple functionality like this.