Author Topic: UI Draggable Panel disAble dragging/ Panel movement  (Read 5438 times)

basil_11

  • Guest
UI Draggable Panel disAble dragging/ Panel movement
« 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?

PoN

  • Full Member
  • ***
  • Thank You
  • -Given: 1
  • -Receive: 4
  • Posts: 111
    • View Profile
Re: UI Draggable Panel disAble dragging/ Panel movement
« Reply #1 on: January 21, 2013, 10:54:43 PM »
Use Disable Drag If Fits flag on UIDraggable Panel.
Worked on Doc&DogAge Of Fury 3D. Actually working on WarMach.

basil_11

  • Guest
Re: UI Draggable Panel disAble dragging/ Panel movement
« Reply #2 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,

PoN

  • Full Member
  • ***
  • Thank You
  • -Given: 1
  • -Receive: 4
  • Posts: 111
    • View Profile
Re: UI Draggable Panel disAble dragging/ Panel movement
« Reply #3 on: January 22, 2013, 03:29:00 AM »
you could check x position in Update(), for example :  if (panel.transform.localPosition.x ==0) return;
Worked on Doc&DogAge Of Fury 3D. Actually working on WarMach.