Hello Guest

Author Topic: How do I make the button to support multitouch?  (Read 5791 times)

yuefeng

  • 2D Toolkit
  • Newbie
  • *
  • Posts: 5
    • View Profile
How do I make the button to support multitouch?
« on: April 01, 2012, 03:01:57 am »
I used 2d ToolKit to make the simple button function, and I need button to support multitouch.
In addition, I would like to know how to make the button called once button pressed , and do not called at released like TK2D default?
Thanks  :D

unikronsoftware

  • Administrator
  • Hero Member
  • *****
  • Posts: 9709
    • View Profile
Re: How do I make the button to support multitouch?
« Reply #1 on: April 01, 2012, 01:06:49 pm »
With regards to multitouch, you will need to modify the source so it uses Input.touches. I did get a contrib a while back with this change, but I haven't got around to merging it. I will try to merge this in for the next release, but I cannot promise it as I am totally occupied completing the tilemap editor right now.

In the latest version, you can hook up to the ButtonDownEvent - this will trigger every time the button is pressed down (rather than released). You will need to do this from script, but this will be much more efficient like this anyway.

yuefeng

  • 2D Toolkit
  • Newbie
  • *
  • Posts: 5
    • View Profile
Re: How do I make the button to support multitouch?
« Reply #2 on: April 02, 2012, 06:53:40 am »
Thank you, tk2d is fantastic, I make 2d action game and my HUD only need a few simple button functions , tk2d  has solved the most problems,I  much hope that it can support multitouch instead of use other GUI plugins .
GoodJob!! ;D