Tasharen Entertainment Forum

Support => NGUI 3 Support => Topic started by: you_inoue on July 08, 2014, 01:14:15 AM

Title: UICenterOnChild of onDragFinished
Post by: you_inoue on July 08, 2014, 01:14:15 AM
Hi!
I am using NGUI3.6.7.

Use the UICenterOnChild, I would like to issue an event that scroll is finished, but it's not working.
Is it possible to have them updated as follows.

  1. UICenterOnChild.OnEnable(Line54)
  2. ----------------------------------------------------------------------
  3. [NGUI3.6.7]
  4. if (mScrollView) mScrollView.onDragFinished = OnDragFinished;
  5. ----------------------------------------------------------------------
  6. [Change]
  7. if (mScrollView) mScrollView.onDragFinished += OnDragFinished;
  8. ----------------------------------------------------------------------
  9.  

  1. UICenterOnChild.Recenter(Line85)
  2. ----------------------------------------------------------------------
  3. [NGUI3.6.7]
  4. mScrollView.onDragFinished = OnDragFinished;
  5.  
  6. if (mScrollView.horizontalScrollBar != null)
  7.         mScrollView.horizontalScrollBar.onDragFinished = OnDragFinished;
  8.  
  9. if (mScrollView.verticalScrollBar != null)
  10.         mScrollView.verticalScrollBar.onDragFinished = OnDragFinished;
  11. ----------------------------------------------------------------------
  12. [Change]
  13. mScrollView.onDragFinished += OnDragFinished;
  14.  
  15. if (mScrollView.horizontalScrollBar != null)
  16.         mScrollView.horizontalScrollBar.onDragFinished += OnDragFinished;
  17.  
  18. if (mScrollView.verticalScrollBar != null)
  19.         mScrollView.verticalScrollBar.onDragFinished += OnDragFinished;
  20. ----------------------------------------------------------------------
  21.  
Title: Re: UICenterOnChild of onDragFinished
Post by: ArenMook on July 08, 2014, 12:07:46 PM
I think you want to tie into onStoppedMoving instead. OnDragFinished is for when you stopped dragging the scroll view, but it will still be moving at that point due to momentum.
Title: Re: UICenterOnChild of onDragFinished
Post by: you_inoue on July 09, 2014, 07:17:48 AM
Do I hear that onStoppedMoving is mounted by future release?

There are three parts which want to detect an event.

1. When operation is completed by UICenterOnChild.Recenter.(UICenterOnChild.onFinished)
2. When operation is completed by UIScrollView.Drag.(UIScrollView.onDragFinished)
3. When operation is completed by UIScrollBar.OnPressBackground and UIScrollBar.OnDragBackground.(UIProgressBar.onDragFinished)

It will be saved if you take these into consideration.
Title: Re: UICenterOnChild of onDragFinished
Post by: ArenMook on July 09, 2014, 03:22:41 PM
Not sure what you mean by "mounted by future release". It was added in the last version.
Title: Re: UICenterOnChild of onDragFinished
Post by: you_inoue on July 10, 2014, 10:56:06 PM
I am sorry.
I'm using a machine translation.

Future onStoppedMoving do you add it?
It is meaning.

It can do, although he would like to do this by onStoppedMoving?

1. When operation is completed by UICenterOnChild.Recenter.(UICenterOnChild.onFinished)
2. When operation is completed by UIScrollView.Drag.(UIScrollView.onDragFinished)
3. When operation is completed by UIScrollBar.OnPressBackground and UIScrollBar.OnDragBackground.(UIProgressBar.onDragFinished)

Title: Re: UICenterOnChild of onDragFinished
Post by: ArenMook on July 11, 2014, 07:53:41 PM
Ah, I'll give it some thought.
Title: Re: UICenterOnChild of onDragFinished
Post by: you_inoue on July 11, 2014, 09:39:09 PM
I have expected the next version.
Thanks in advance :D