Reputation: 337
How to deactivate a button in corona? I want a button(any image with event listener acting as a button)which can be disabled.I want to enable it later.
Upvotes: 1
Views: 99
Reputation: 6337
You can simply remove the listener from the image:
button:removeEventListener("tap", myListener)
and then add it back when you want it to be active again.
button:addEventListener("tap", myListener)
Upvotes: 2