Tasharen Entertainment Forum

Support => NGUI 3 Support => Topic started by: mmuller on September 26, 2012, 06:12:01 AM

Title: Draggablepanel & UIGrid ?
Post by: mmuller on September 26, 2012, 06:12:01 AM
Sorry if this has been covered before but I can't find anything in the forums.

I want to create a set of information panels in a horizontal UIGrid, when the user swipes or presses the advance button the panel will move to the next item in the grid - not allowing for half panels to be visible.

Is there a built-in option to UIGrid to only show the entire item if its size is the same as the panel it sits in - or am I into creating a List<> of items and tweening the position of the panel OnClick?

Regards,

M
Title: Re: Draggablepanel & UIGrid ?
Post by: dreamora on September 28, 2012, 09:58:24 AM
You will need to handle the movement yourself.

But for the centering in, that sounds like you want to additionally add UICenterOnChild to the dragpanel gameobject and then handle the move of the panel manually (through the drag panels MoveRelative function) upon click by moving the panel by the configured cell size of the grid + space between the grid elements
Title: Re: Draggablepanel & UIGrid ?
Post by: ArenMook on September 28, 2012, 12:39:26 PM
The updated scroll view example shows how to use UICenterOnChild.
Title: Re: Draggablepanel & UIGrid ?
Post by: mmuller on February 16, 2013, 06:56:04 PM
OK, thanks guys, I'll have a play with it :D