Author Topic: UIDraggablePanel Scroll shouldn't disable spring if scrollWheelFactor is 0  (Read 1484 times)

getluky

  • Guest
I had a conflict between UIDraggablePanel and another script I wrote to handle scrolling of my draggable panel separately. It turns out that UIDraggablePanel still calls DisableSpring even if scrollWheelFactor is zero, which seems like a small oversight. Can this be changed in the NGUI codebase to support external scroll scripting?

In UIDraggablePanel.Scroll, changing
  1. if (enabled && NGUITools.GetActive(gameObject))
to
  1. if (enabled && NGUITools.GetActive(gameObject) && Mathf.Abs(scrollWheelFactor) > 0)
seemed to do the trick.