Hello Guest

Author Topic: tk2dUIItem pressed wait time  (Read 3600 times)

airzone

  • Newbie
  • *
  • Posts: 2
    • View Profile
tk2dUIItem pressed wait time
« on: March 04, 2014, 07:11:21 am »
Hi,
In tk2dButton there is pressedWaitTime before allowing the button to be pressed again. How can I have this functionality on tk2dUIItem?
Or is there a way to make a button not clickable for a period of time?

Thanks!

unikronsoftware

  • Administrator
  • Hero Member
  • *****
  • Posts: 9709
    • View Profile
Re: tk2dUIItem pressed wait time
« Reply #1 on: March 04, 2014, 11:07:39 am »
tk2d doesn't do that out of the box. However, you can create a behaviour that turns the collider off on the tk2dUIItem for a period of time. That will effectively turn off the button, and you can turn it back on whenever you like. You can do this really easily with a coroutine triggered from the OnClick / OnDown event.

airzone

  • Newbie
  • *
  • Posts: 2
    • View Profile
Re: tk2dUIItem pressed wait time
« Reply #2 on: March 05, 2014, 02:22:09 am »
Ok,
Thank you! I like the pressedWaitTime functionality on tk2dButton, but now tk2dButton is deprecated. If you can add it to tk2dUIItem it will be a great help.  :)