Tasharen Entertainment Forum

Support => NGUI 3 Support => Topic started by: kakkou on November 20, 2015, 04:38:19 AM

Title: Mouse wheel scrolling doesn't work after drag and drop (Version 3.9.2)
Post by: kakkou on November 20, 2015, 04:38:19 AM
" Example 11 - Drag & Drop" but it occurs.

UIDragDropItem makes mDragScrollView disable at the time of drug starting.
Because UIScrollView.Press (false) in UIDragScrollView isn't called at the time of a drug end.
UIScrollView.mPressed won't be false, so you keep clearing UIScrollView.mScroll.
Title: Re: Mouse wheel scrolling doesn't work after drag and drop (Version 3.9.2)
Post by: ArenMook on November 25, 2015, 05:12:20 PM
Try simply adding "mPressed = false;" to UIScrollView's OnDisable function.
  1. void OnDisable () { list.Remove(this); mPressed = false; }
Title: Re: Mouse wheel scrolling doesn't work after drag and drop (Version 3.9.2)
Post by: kakkou on December 01, 2015, 05:05:39 AM
UIScrollView isn't invalidated in case of Drag&Drop, so it isn't improved by the correction.

The cause is because UIDragScrollView.OnPress (false) isn't called to the time of a mouse release of an item.
Title: Re: Mouse wheel scrolling doesn't work after drag and drop (Version 3.9.2)
Post by: ArenMook on December 01, 2015, 07:47:56 AM
Had a look into this.. add this to UIDragScrollView and it fixes the issue:
  1.         void OnDisable ()
  2.         {
  3.                 if (mScroll != null)
  4.                 {
  5.                         mScroll.Press(false);
  6.                         mScroll = null;
  7.                 }
  8.         }
Title: Re: Mouse wheel scrolling doesn't work after drag and drop (Version 3.9.2)
Post by: kakkou on December 01, 2015, 09:13:23 PM
A problem was settled. ;D
Thank you!