Author Topic: Disabling multitouch on UICamera  (Read 5837 times)

jeldrez

  • Sr. Member
  • ****
  • Thank You
  • -Given: 8
  • -Receive: 4
  • Posts: 352
    • View Profile
Disabling multitouch on UICamera
« on: May 23, 2013, 03:28:32 PM »
I unticket "Allow Multi Touch" from UICamera  but I still can press more than one button in the screen.
How I can disable that?  I just want the user to press one button in the screen.


Thanks!

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Disabling multitouch on UICamera
« Reply #1 on: May 23, 2013, 09:02:33 PM »
Allow multi-touch turned off means all touches are treated as the same one. It's as if you were using one fat finger. :)

jeldrez

  • Sr. Member
  • ****
  • Thank You
  • -Given: 8
  • -Receive: 4
  • Posts: 352
    • View Profile
Re: Disabling multitouch on UICamera
« Reply #2 on: May 24, 2013, 12:09:45 AM »
ohh, so how can I only make available just one touch input?

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Disabling multitouch on UICamera
« Reply #3 on: May 24, 2013, 05:50:30 PM »
You will need to modify the UICamera to block touches if you already have one active, or simply check UICamera.touchCount in your callback functions like OnPress, and don't do anything if it's more than 1. You might also want to record the UICamera.currentTouchID if the touchCount is 1 to allow the logic to keep going if the touchID matches.