Author Topic: Draggablepanel & UIGrid ?  (Read 2512 times)

mmuller

  • Guest
Draggablepanel & UIGrid ?
« 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
« Last Edit: September 26, 2012, 01:40:31 PM by mmuller »

dreamora

  • Guest
Re: Draggablepanel & UIGrid ?
« Reply #1 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

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Draggablepanel & UIGrid ?
« Reply #2 on: September 28, 2012, 12:39:26 PM »
The updated scroll view example shows how to use UICenterOnChild.

mmuller

  • Guest
Re: Draggablepanel & UIGrid ?
« Reply #3 on: February 16, 2013, 06:56:04 PM »
OK, thanks guys, I'll have a play with it :D