Author Topic: NGUI Touch Event Issue  (Read 1840 times)

coxy17

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 23
    • View Profile
NGUI Touch Event Issue
« on: November 10, 2014, 04:00:07 PM »
Hi, i have NGUI setup fine and have setup a button to work using OnPressEventDown and have one OnPressEventUp. These work fine, however, ive noticed when i hold the button down and move my finger away from the button (anywhere on the screen) whilst not lifting my finger, it doesnt realise that im not over the button anymore? how can i detect this?

totally lost

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: NGUI Touch Event Issue
« Reply #1 on: November 10, 2014, 10:04:57 PM »
What is OnPressEventDown and OnPressEventUp? Those are not NGUI events. NGUI gets OnPress(bool isPressed).

Moving the finger away from the button won't sent OnPress(false). You get OnDragOut() instead.

coxy17

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 23
    • View Profile
Re: NGUI Touch Event Issue
« Reply #2 on: November 11, 2014, 02:59:52 AM »
Sorry forgot to mention im using playmaker to talk to NGUI. But still using OnPress. Ive used the OnDragOut() and it works perfectly! thanks!