Author Topic: Best Way to Create a List Window  (Read 3608 times)

Darkness

  • Jr. Member
  • **
  • Thank You
  • -Given: 3
  • -Receive: 0
  • Posts: 90
    • View Profile
Best Way to Create a List Window
« on: November 17, 2013, 04:06:26 AM »
I jumped out of the GUI stuff to work on a few other things related to my game and now I'm working on a "save" and "load" window.  The issue I have is what is the best way to do a list window?  In other words, there are 10 save files and I want to display 5 on the screen with a list scrolling up or down as the player moves down or up the list with a highlight indicating the the choice the player is currently on.  I don't want a drop down window, however.

Anyone have any ideas?

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Best Way to Create a List Window
« Reply #1 on: November 17, 2013, 08:00:38 PM »
Scrollable panel would work best here. Easiest thing to do would be to create it upfront and hide it. When you want to show it, SetActive the game object and populate it with the values you need.

Darkness

  • Jr. Member
  • **
  • Thank You
  • -Given: 3
  • -Receive: 0
  • Posts: 90
    • View Profile
Re: Best Way to Create a List Window
« Reply #2 on: November 17, 2013, 09:53:30 PM »
Thanks AM.  I'll give it a try. 

*EDIT:*  I'm gonna assume that you mean the draggable panel?  Also is there a way to turn off the dragging part so that it can only be moved with keys (up down arrow) or controller d-pad?
« Last Edit: November 17, 2013, 10:16:00 PM by Darkness »

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Best Way to Create a List Window
« Reply #3 on: November 18, 2013, 01:21:54 AM »
UIDragPanelContents script is what makes it possible to drag the panel, so if you remove that script, you will disallow the mouse-based movement.