Author Topic: problem with UICamera is set to Use Touch only.  (Read 2460 times)

yuewah

  • Full Member
  • ***
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 180
    • View Profile
problem with UICamera is set to Use Touch only.
« on: May 20, 2012, 10:44:13 PM »
If UICamera is set to Use Touch only, Hover color of UIButton remains unchanged while playing in editor.

loopyllama

  • Guest
Re: problem with UICamera is set to Use Touch only.
« Reply #1 on: May 20, 2012, 11:37:16 PM »
touch is for mobile devices. you cannot detect a finger hovering above a mobile device. so on hover does nothing when your mouse events are disabled on the camera.

yuewah

  • Full Member
  • ***
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 180
    • View Profile
Re: problem with UICamera is set to Use Touch only.
« Reply #2 on: May 21, 2012, 12:58:31 AM »
yes, I understand it. I think it should disable hover if "use Touch" is set only for UICamera while playing in editor.

loopyllama

  • Guest
Re: problem with UICamera is set to Use Touch only.
« Reply #3 on: May 21, 2012, 12:15:40 PM »
Yeah that sounds pretty good.
Try:
UICamera.cs line 896, change:
  1. if (currentTouch.pressed == mHover)
to
  1. if (currentTouch.pressed == mHover && useMouse)