2D Toolkit Forum

2D Toolkit => Support => Topic started by: airzone on March 04, 2014, 07:11:21 am

Title: tk2dUIItem pressed wait time
Post by: airzone 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!
Title: Re: tk2dUIItem pressed wait time
Post by: unikronsoftware 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.
Title: Re: tk2dUIItem pressed wait time
Post by: airzone 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.  :)