Tasharen Entertainment Forum
Support => NGUI 3 Support => Topic started 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
-
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
-
The updated scroll view example shows how to use UICenterOnChild.
-
OK, thanks guys, I'll have a play with it :D