Author Topic: Bug with the spring scrolling when using a mac trackpad  (Read 6813 times)

laurentl

  • Full Member
  • ***
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 188
    • View Profile
    • McDROID
Bug with the spring scrolling when using a mac trackpad
« on: May 09, 2013, 03:14:30 PM »
When using the trackpad on a macbookpro the panel gets sent so far that it takes a long time for the spring to bring the panel back in view.
A solution would be to stop scrolling when the panel is out of view.

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Bug with the spring scrolling when using a mac trackpad
« Reply #1 on: May 10, 2013, 12:29:10 AM »
Report it to Unity, not me. Sounds like Unity is once again having issues with the trackpad.

laurentl

  • Full Member
  • ***
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 188
    • View Profile
    • McDROID
Re: Bug with the spring scrolling when using a mac trackpad
« Reply #2 on: May 10, 2013, 01:40:38 AM »
Aren't you working at Unity ?

Regardless of whose fault for the wrong input, spring drag could use limiters.

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Bug with the spring scrolling when using a mac trackpad
« Reply #3 on: May 11, 2013, 12:36:58 AM »
Not my domain. I work on the next UI system, not on fixing bugs in some unrelated part of the code (input).

laurentl

  • Full Member
  • ***
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 188
    • View Profile
    • McDROID
Re: Bug with the spring scrolling when using a mac trackpad
« Reply #4 on: May 11, 2013, 02:04:04 AM »
That's a pretty lame answer especially considering I gave you a workaround.

Alright you don't seem cooperative so just tell me where in your code I can put a limiter.

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Bug with the spring scrolling when using a mac trackpad
« Reply #5 on: May 11, 2013, 12:35:12 PM »
Alright, here is a more detailed answer.

Unity engine has a metric fuckton of code written over the past 10 years by hundreds of different developers. I came onboard a few months ago with the goal of creating a new UI system to be used within Unity. It's no surprise that I don't yet know every nook and cranny of the engine, and certainly don't take it upon myself to investigate and fix every issue that crops up, especially on very specific and select hardware like a magic trackpad.

In addition to my full time job at Unity I also have to support NGUI by myself -- which is a full time job in itself with all the questions I get here. The only way I can stay sane and do both, is by keeping my answers short and to the point.

And speaking of questions, you ask a lot of questions, many of which can be answered by searching the forums or just by looking at the code a little bit. NGUI comes in source code form for a reason -- if something doesn't work as you expect, either debug it and figure out why, or modify it to make it work the way you want it to. Many people here do exactly that -- they look at the code, figure stuff out, then post not only a bug report, but also a solution on how to fix it or get around it. You, on the other hand, just keep asking questions.

Bottom line is -- if you want to get more, try contributing more. Help me by saving my time, and I will be more than happy to return the favor.

laurentl

  • Full Member
  • ***
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 188
    • View Profile
    • McDROID
Re: Bug with the spring scrolling when using a mac trackpad
« Reply #6 on: May 11, 2013, 06:33:40 PM »
Alright, I see your angle, I was considering NGUI as a closed product, that habit of using Unity. So I took a look at your code and found that there is a function in place to restrict the drag, it's toggled by "restrict within panel". That bool is on by default, probably why I didn't pay attention to it, but that didn't work. It requires bounds and bounds are only calculated when there is a sprite attached to it, or clipping is on - that was the problem.
So I set clipping scales and now it's working fine, no longer disappearing off screen.

The two finger scroll has inertia and that inertia is still fighting with the spring and jumping up and down - I can live with this glitch (MD takes 2 minutes per "search reference" and I have other cats to skin)

dlewis

  • Guest
Re: Bug with the spring scrolling when using a mac trackpad
« Reply #7 on: May 11, 2013, 09:35:06 PM »
MD takes 2 minutes per "search reference" and I have other cats to skin

That's why I don't use Monodevelop unless I have to debug, it's so bad.

laurentl

  • Full Member
  • ***
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 188
    • View Profile
    • McDROID
Re: Bug with the spring scrolling when using a mac trackpad
« Reply #8 on: May 11, 2013, 09:39:36 PM »
Are you on PC using VS? I'm preparing bootcamp because it's sluggish.

dlewis

  • Guest
Re: Bug with the spring scrolling when using a mac trackpad
« Reply #9 on: May 11, 2013, 11:42:54 PM »
Are you on PC using VS? I'm preparing bootcamp because it's sluggish.

Yep. Most of the others here are either using VS through bootcamp or parallels, only 1 or 2 are using Monodevelop (on OSX).

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Bug with the spring scrolling when using a mac trackpad
« Reply #10 on: May 12, 2013, 06:59:55 AM »
VisualStudio with VisualAssistX plugin is an absolute must for any serious development. Well, some prefer ReSharper instead of VisualAssistX, but that's just a matter of preference.

I do all my work on a mac... bootcamped into Windows.

Nicki

  • Global Moderator
  • Hero Member
  • *****
  • Thank You
  • -Given: 33
  • -Receive: 141
  • Posts: 1,768
    • View Profile
Re: Bug with the spring scrolling when using a mac trackpad
« Reply #11 on: May 12, 2013, 09:38:08 AM »
I'm still using MonoDevelop on windows and mac. I guess I'm a weirdo.  8)