Author Topic: NGui and Gestures  (Read 4936 times)

Rozik

  • Guest
NGui and Gestures
« on: October 19, 2012, 05:09:28 PM »
Hi guys,

i have some custom code to detect some gestures i need like swipe and zoom.

Works great but when the gesture starts on top of some gui element like a button the event for that element is called too.

Anyone able ot help me out with whats best practise to disable Ngui events when a gesture was reconized and turn it back on afterwards? Or am i missing something?

Thx a lot for any hints you can give me.

AndyGFX

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 1
  • Posts: 24
    • View Profile
    • AndyGFX
Re: NGui and Gestures
« Reply #1 on: October 19, 2012, 05:30:06 PM »
Try add collision plane at top of all elements when OnPress is true, and remove when gesture is done.

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: NGui and Gestures
« Reply #2 on: October 20, 2012, 12:13:59 AM »
You can use the UICamera.fallThrough if you want to handle gestures that were not handled by a widget, or UICamera.genericEventHandler if your gestures can begin anywhere -- on UI or not.