Tasharen Entertainment Forum

Support => NGUI 3 Support => Topic started by: Darkness on November 17, 2013, 04:06:26 AM

Title: Best Way to Create a List Window
Post by: Darkness 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?
Title: Re: Best Way to Create a List Window
Post by: ArenMook 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.
Title: Re: Best Way to Create a List Window
Post by: Darkness 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?
Title: Re: Best Way to Create a List Window
Post by: ArenMook 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.