setchi / FancyScrollView

[Unity] Scroll view component that can implement highly flexible animations.
https://setchi.jp/FancyScrollView/
MIT License
3.04k stars 385 forks source link

How to use mouse to scroll? #37

Open longvannguyendx opened 4 years ago

longvannguyendx commented 4 years ago

Hi,

As the title. How to use the middle mouse to scroll?

Thanks.

setchi commented 4 years ago

@longvannguyendx Hi.

I added mouse wheel input support to Scroller : https://github.com/setchi/FancyScrollView/commit/bf3fd361441fa98434b83dfc08adbafd268c6242

Try the newest version. Thanks.

longvannguyendx commented 4 years ago

Hi, I tested and find out one issue: When you scroll to end and you will can not scroll anymore. Thanks.

setchi commented 4 years ago

@longvannguyendx Would you mind provide a small example project? Or can you explain with gif?

longvannguyendx commented 4 years ago

Hi, This issue is occur when I set Moment Type of Scroller is Clamped. Note: I tested in your example. BTW, I can not set Scroll sensitivity , It's calculate automatically and hard to scroll when we have big data on list. Thanks.

setchi commented 4 years ago

@longvannguyendx Thank you for the report. I will investigate it. Is it 07_ScrollRect ?

longvannguyendx commented 4 years ago

Hi, Yes, It's 07_ScrollRect. Let me know if you need more information. Thanks.

setchi commented 4 years ago

@longvannguyendx

Fixed: https://github.com/setchi/FancyScrollView/commit/ac830a74f062e189f96694938f610666030a70e8

When you scroll to end and you will can not scroll anymore.

longvannguyendx commented 4 years ago

Hi @setchi I tested on 07_ScrollRect and i found 2 issues:

  1. When we click on top / bottom of scrollbar then I can not see scrollbar anymore. You can see the video here: https://drive.google.com/file/d/1v4raiZrPDe9H22aDjLAmKaVSfF8byDRe/view.

    2.Scroll sensitivity is calculated automatically when we start, and hard to scroll when we have big data on list. In order to fix this. I try to add some code in onScroll of Scroller and It work ok. You can consider use this code if you want. Please see file attachment for more details.

OnScroll

Thanks.

setchi commented 4 years ago

@longvannguyendx Thank you for the your report! Please try this and make sure the issue is resolved.

Screen Shot 2019-12-27 at 13 58 57
setchi commented 4 years ago

@longvannguyendx I think that the problem of slow scrolling with the mouse wheel also occurs with uGUI standard ScrollRect. I will investigate the Unity specification and consider a formal fix.