Author Topic: ScrollView w/ Drag&Drop and different Panels  (Read 1570 times)

jeldrez

  • Sr. Member
  • ****
  • Thank You
  • -Given: 8
  • -Receive: 4
  • Posts: 352
    • View Profile
ScrollView w/ Drag&Drop and different Panels
« on: June 12, 2014, 04:30:46 PM »
Hi,
I'm using scrollviews with soft clipping and the items inside has an UIPanel, and when you drag out and it comes back to the scrollview it clips with the scrollview even if it has a UIDragDropRoot in the parent Panel. That the correct behavior? Also we have a container where you put the selected item and you can replace it with another item, but each time you replace it the old item came back to the scrollview but doesn't clip. The coders told me they just change the parent of the item. I don't know what else they have to do. Any help will be appreciated.

The hierarchy is this one:
UIPanel [Scrollview]
|- UIGrid
|-- ItemContainer [specific script]
|--- Item [UIPanel/Collider/UIButton/DragDropItem/UIDragScrollView]

Best,
Emilio

*EDIT*
Also, if the Grid it's with 'Keep Within Panel' checked and I drag an item down and up the grid moves.
« Last Edit: June 12, 2014, 05:23:12 PM by jeldrez »

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: ScrollView w/ Drag&Drop and different Panels
« Reply #1 on: June 13, 2014, 04:16:38 AM »
When you drag out and it comes back? I'm going to assume drag & drop. My guess -- you never notified the widgets that you've changed the parent. NGUITools.MarkParentAsChanged.

Check the drag & drop example that come with NGUI.