Author Topic: UIScrollView OnPan upgrade bug  (Read 2204 times)

user18

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 1
    • View Profile
UIScrollView OnPan upgrade bug
« on: March 31, 2016, 09:36:47 AM »
Hi,

No idea if that was reported or not, but just in case:

when you use UIScrollView OnPan method it's still using "scale" field, which was deprecated.
NGUI after upgrade sets it to 0 thus making it impossible to use OnPan method.

change
         if (scale.x != 0) Scroll(delta.x);
         else if (scale.y != 0f) Scroll(delta.y);
to
         if (delta.x != 0) Scroll(delta.x);
         else if (delta.y != 0f) Scroll(delta.y);

p.s it's incredible dumb to ask to enter TNET and NGUI names with registration, I was using NGUI for some years, but didn't had any idea what Tasharen network package is and was forced to spend my time to figure that out gosh
p.p.s on gmail the forum activation mail falls to spam by default

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: UIScrollView OnPan upgrade bug
« Reply #1 on: April 01, 2016, 12:26:11 PM »
Thanks, but it should actually be:
  1. if (canMoveHorizontally) Scroll(delta.x);
  2. else if (canMoveVertically) Scroll(delta.y);