Tasharen Entertainment Forum

Support => NGUI 3 Support => Topic started by: DirtyHippy on April 20, 2015, 10:13:14 PM

Title: Upgrade to 3.8.2 from 3.8.1 button OnClicks stopped working, etc
Post by: DirtyHippy on April 20, 2015, 10:13:14 PM
I tracked down the issue to the tooltip delay.  It would set the ClickNotification to None when the tooltip delay was 0.0001 (I was using essentially no delay).  Once I realized what the code was doing, changing the tooltip delay to 0.5 fixed the issue.

Can someone explain why the tooltip delay is now tied to anything around click processing?  Its not a huge deal, but I would still like to know why this is.

Title: Re: Upgrade to 3.8.2 from 3.8.1 button OnClicks stopped working, etc
Post by: ArenMook on April 22, 2015, 01:55:51 PM
In short, there are two ways to show a tooltip: hover over something, or press and hold. In your case the latter (press and hold) is setting the click notification to "none".

You need to do 2 things. First, set the tooltip delay to 0. There is no reason to use 0.0001.

Second, modify UICamera's ProcessTouch() function around line 1969:
  1.                         // Hold event = show tooltip
  2.                         if (currentTouch.pressed == currentTouch.current && mTooltipTime != 0f && // <-- this changes
  3.                                 currentTouch.clickNotification != ClickNotification.None &&
  4.                                 !currentTouch.dragStarted && currentTouch.deltaTime > tooltipDelay)