Tasharen Entertainment Forum

Support => NGUI 3 Support => Topic started by: basil_11 on January 21, 2013, 10:09:23 PM

Title: UI Draggable Panel disAble dragging/ Panel movement
Post by: basil_11 on January 21, 2013, 10:09:23 PM
Hi,

can anyone help me on how to stop the panel movement when panel is in position x == 0?
Title: Re: UI Draggable Panel disAble dragging/ Panel movement
Post by: PoN on January 21, 2013, 10:54:43 PM
Use Disable Drag If Fits flag on UIDraggable Panel.
Title: Re: UI Draggable Panel disAble dragging/ Panel movement
Post by: basil_11 on January 22, 2013, 01:14:14 AM
hi Pon,

if i will use that, i cannot move the panel again,

and child inside the panel doesn't really fit to it,
my draggable panel only have 8 object children which i keep on reusing even i have 1k objects/ sprites to show

for example i have 100 list of cards and i only have 8 objects to put my 100 cards to do that, i keep on reusing the objects which is the draggable contents and just replacing the old image to a new one, i the list(which is the cards) is now at 100 i will disable the dragging,
Title: Re: UI Draggable Panel disAble dragging/ Panel movement
Post by: PoN on January 22, 2013, 03:29:00 AM
you could check x position in Update(), for example :  if (panel.transform.localPosition.x ==0) return;