Tasharen Entertainment Forum

Support => NGUI 3 Support => Topic started by: deram_scholzara on December 15, 2013, 12:11:22 AM

Title: Not Using Scroll Wheel Fix
Post by: deram_scholzara on December 15, 2013, 12:11:22 AM
I don't have an axis set up for the mouse scroll wheel because I don't use it in my game.  NGUI, however, currently expects that if you're using the mouse, you must be using the scroll wheel.  To get around this, I changed this part of UICamera.cs:
  1.                         float scroll = Input.GetAxis(scrollAxisName);
  2.                         if (scroll != 0f) Notify(mHover, "OnScroll", scroll);
to this:
  1.                         if (!string.IsNullOrEmpty(scrollAxisName)) {
  2.                                 float scroll = Input.GetAxis(scrollAxisName);
  3.                                 if (scroll != 0f) Notify(mHover, "OnScroll", scroll);
  4.                         }
Title: Re: Not Using Scroll Wheel Fix
Post by: ArenMook on December 15, 2013, 08:11:46 AM
That makes sense. I'll mirror the change on my end.