Author Topic: UICenterOnChild of onDragFinished  (Read 6226 times)

you_inoue

  • Newbie
  • *
  • Thank You
  • -Given: 2
  • -Receive: 0
  • Posts: 15
    • View Profile
UICenterOnChild of onDragFinished
« 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.  

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: UICenterOnChild of onDragFinished
« Reply #1 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.

you_inoue

  • Newbie
  • *
  • Thank You
  • -Given: 2
  • -Receive: 0
  • Posts: 15
    • View Profile
Re: UICenterOnChild of onDragFinished
« Reply #2 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.

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: UICenterOnChild of onDragFinished
« Reply #3 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.

you_inoue

  • Newbie
  • *
  • Thank You
  • -Given: 2
  • -Receive: 0
  • Posts: 15
    • View Profile
Re: UICenterOnChild of onDragFinished
« Reply #4 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)


ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: UICenterOnChild of onDragFinished
« Reply #5 on: July 11, 2014, 07:53:41 PM »
Ah, I'll give it some thought.

you_inoue

  • Newbie
  • *
  • Thank You
  • -Given: 2
  • -Receive: 0
  • Posts: 15
    • View Profile
Re: UICenterOnChild of onDragFinished
« Reply #6 on: July 11, 2014, 09:39:09 PM »
I have expected the next version.
Thanks in advance :D