Hello Guest

Author Topic: Not Allow Pressing Two Buttons At The Same Time  (Read 5786 times)

longbottomup

  • Newbie
  • *
  • Posts: 13
    • View Profile
Not Allow Pressing Two Buttons At The Same Time
« on: August 28, 2014, 04:02:05 pm »
I use 2D Toolkit for my button, i have got a problem. My buttons nearly very, if my finger touch there, two button active at a same time. Now, how can i do to fix it? I want to only one button active at time. Is there any way except to distance them?? I don't want distance them.

unikronsoftware

  • Administrator
  • Hero Member
  • *****
  • Posts: 9709
    • View Profile
Re: Not Allow Pressing Two Buttons At The Same Time
« Reply #1 on: August 29, 2014, 03:35:05 pm »
Are you using tk2dButton (the old legacy unsupported one) or the button from tk2dUI? In tk2dUI, if you turn off multitouch you will only be able to click one button at a time.

longbottomup

  • Newbie
  • *
  • Posts: 13
    • View Profile
Re: Not Allow Pressing Two Buttons At The Same Time
« Reply #2 on: August 30, 2014, 01:11:39 pm »
Thanks for your help. Can you show me where they are? Here my script:




I can't see the area turn off MultiTouch & Button Sprite: Up, Down and Press.

unikronsoftware

  • Administrator
  • Hero Member
  • *****
  • Posts: 9709
    • View Profile
Re: Not Allow Pressing Two Buttons At The Same Time
« Reply #3 on: August 30, 2014, 07:46:18 pm »
It will be on the tk2d Ui manager, or tk2d UI Camera scripts.

longbottomup

  • Newbie
  • *
  • Posts: 13
    • View Profile
Re: Not Allow Pressing Two Buttons At The Same Time
« Reply #4 on: August 31, 2014, 04:00:50 am »
Thank you, i got it. But i have a last question: i can't see where i put the Sprite for Down, Up or Press button.



unikronsoftware

  • Administrator
  • Hero Member
  • *****
  • Posts: 9709
    • View Profile
Re: Not Allow Pressing Two Buttons At The Same Time
« Reply #5 on: August 31, 2014, 04:35:50 pm »
You dont. The tk2d UI system is modular, I recommend taking a look at the built in component prefabs and demos to get an idea of how to switch sprites, etc. You create the sprites and the UIUpdownbutton will show and hide the relevant ones.

longbottomup

  • Newbie
  • *
  • Posts: 13
    • View Profile
Re: Not Allow Pressing Two Buttons At The Same Time
« Reply #6 on: September 01, 2014, 11:51:46 pm »
Thank you pro, i guest so. Thank you again.