Tasharen Entertainment Forum
Support => NGUI 3 Support => Topic started by: mimminito on November 25, 2013, 12:17:45 PM
-
I have updated NGUI to the latest version, and I am now using the newly named UIScrollView and UIDragScrollView on its children.
However, unlike before, when I click on an object, it instantly scrolls the panel to a location. I do not want the panel to scroll if I click on the item, because I may have other actions to be performed on a click, and it just looks buggy if it scrolls as well.
Could you fix the UIDragScrollView class to behave like the old version did? Only scroll the panel when you drag/scroll, and do not scroll when clicked?
-
It would appear this is due to the Restrict Within Panel option being checked. If its off, it does not scroll to a random location when an item is pressed... Is this correct behaviour?
-
Scrolling to an item on click happens if you have UICenterOnClick attached, which is a new script -- so I doubt that's the cause. I don't see anything that would reposition the panel on click in the base code, and I can't reproduce it in the scroll view example. Can you provide more details?
-
Hi,
Sure. Attached are some screenshots of my "Items" inspector. As you can see, there is no UICenterOnClick attached. However, when I click on an item, it auto moves the panel (not to the item clicked, but another one).
I unchecked the Restrict Within Panel option, run it up again, and it all began to work as normal (i.e. no scrolling when clicking, only dragging).
All I could see, was than when Press was called in the UIScrollView class, and "false" was passed through, it would call RestrictWithinBounds. I just thought I would give it a go by turning off that option, and it worked!
I cant give much more information off the top of my head, but if there is anything specific you need, let me know.
Adam