Author Topic: UIButton remains hovered  (Read 2093 times)

erre

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 6
    • View Profile
UIButton remains hovered
« on: August 30, 2017, 10:20:23 AM »
Hi all,

I'm working on a project using NGUI 3.11.4. I have this problem: when I press a button and, without release, I drag until I'm on a second button, if I release the second button remains in hovered state until I do something else.

I guess it is correct with mouse, but not with touch.

Am I wrong? How can I change this behaviour?

Thank you.

Best regards,
Andrea.

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: UIButton remains hovered
« Reply #1 on: August 30, 2017, 04:59:17 PM »
I'm not seeing this in the Example: Menu scene. I select the UICamera, turn off the mouse events, then press on one button, drag and release on the other -- second button does not get the hover state. Hover state is for mouse events, as you mentioned -- not touch.

erre

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 6
    • View Profile
Re: UIButton remains hovered
« Reply #2 on: August 31, 2017, 02:23:28 AM »
Sorry, I forgot to write that I have this only in build (Android, not tested iOS).

It happens also when I have two panels: one on top and on under the first. If I close the panel on top clicking a close button, the button located under the close button on the second panel (the which one that was behind) remains in hovered state. I can't figure out why.

Do you suggest to turn off mouse button in build?

Thank you.

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: UIButton remains hovered
« Reply #3 on: August 31, 2017, 10:25:59 AM »
If it's on a mobile device, then you definitely don't need the mouse input -- so yes, try turning it off.

erre

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 6
    • View Profile
Re: UIButton remains hovered
« Reply #4 on: August 31, 2017, 11:10:24 AM »
Fixed, thank you!