Author Topic: List of objects in a window...  (Read 7086 times)

Darkness

  • Jr. Member
  • **
  • Thank You
  • -Given: 3
  • -Receive: 0
  • Posts: 90
    • View Profile
List of objects in a window...
« on: April 20, 2015, 09:21:09 PM »
Okay, I think I need help trying to figure this one out.  It's a big problem I've been having for a long time now and I think I finally need to figure out how to get it working.

What I want is a window that holds a list of items (they're GameObjects with multiple parts (labels, sprites, etc.)) and this list can be navigated via keyboard, controller, or mouse.  There's a selector object that highlights the selected area and list can have a scrollbar for the mouse users.  Of course the panel is clipped so that the list can be as long as I want.

What is the best way to do this?  I'm trying a table, but I have a feeling this isn't going to work.  I'm open to ideas, but I do want something relatively simple to put together.  I don't mind writing the keyboard/controller functionality via code.  I'm just more interested in the setup and getting the window to scroll via keyboard or controller.  Mouse seems easy enough, but getting this to function with a keyboard has been difficult.

I included a screen that might show what I'm trying to do better.
http://www.blogcdn.com/wow.joystiq.com/media/2010/07/cata-trainer-ui-1278056625.jpg (It's WoW.)

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: List of objects in a window...
« Reply #1 on: April 22, 2015, 01:29:07 PM »
What games typically do is let right thumbstick move the scroll view, and left thumbstick do navigation. This means that there should ideally be no more than one active scroll view on the screen at a time. Best UI designs targeting controller input utilize tabs, not scroll views.

WoW isn't a game you can play using a controller, so it's not a good idea to use it as an example.

I'm going to be re-designing controller input for UI in the next week or so for Windward, so we'll see what comes out of it.

Darkness

  • Jr. Member
  • **
  • Thank You
  • -Given: 3
  • -Receive: 0
  • Posts: 90
    • View Profile
Re: List of objects in a window...
« Reply #2 on: April 22, 2015, 02:59:17 PM »
What games typically do is let right thumbstick move the scroll view, and left thumbstick do navigation. This means that there should ideally be no more than one active scroll view on the screen at a time. Best UI designs targeting controller input utilize tabs, not scroll views.

WoW isn't a game you can play using a controller, so it's not a good idea to use it as an example.

I'm going to be re-designing controller input for UI in the next week or so for Windward, so we'll see what comes out of it.

Well, there are going to be lists in the game, and I want the lists to be navigated by the controller.  I've tried to keep things simple enough so that controller navigation is easy.  However, when going into a shop, or looking at quest lists, and things like this it's impossible to do without some kind of scrolling.  I don't know if you've played Mass Effect on the console, but that game has some huge lists that are navigated by the controller.  I can move a cursor (or selector) within a window, but scrolling the window up or down is trouble.  How to push the scroll view up or down or what happens when the selector is at the bottom of the list.  Would be easy enough if I knew the size of the list, but there's still the issue of scrolling the list up or down in a simple way.

That's really what I'm trying to find out.  How to push a list up or down in an easy way, but if I have to do it "by hand", then I'll do that, too.  I did it with the windows originally before I switched to tabs...which turned out to be easy with the controller.  If you can solve the scroll problem (pushing things up and down the list manually), then it can be done.

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: List of objects in a window...
« Reply #3 on: April 24, 2015, 07:34:14 AM »
UIScrollView.Scroll can be used to move the scroll view as needed. Watch for right thumbstick input, and adjust the scroll view's position using that function.