Author Topic: Upgrade to 3.8.2 from 3.8.1 button OnClicks stopped working, etc  (Read 1763 times)

DirtyHippy

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 25
    • View Profile
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.


ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Upgrade to 3.8.2 from 3.8.1 button OnClicks stopped working, etc
« Reply #1 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)