Tasharen Entertainment Forum

Support => NGUI 3 Support => Topic started by: zenmaster on March 31, 2014, 02:24:21 PM

Title: Disabled button passes through click events
Post by: zenmaster on March 31, 2014, 02:24:21 PM
Hi All,

I'm using the following code to disable UIButtons.
button.isEnabled = false;

If you click on the disable button, the event goes through and hits a collider below it.
Is this the correct way to disable a button?

Thanks.
Title: Re: Disabled button passes through click events
Post by: ArenMook on April 01, 2014, 07:33:12 AM
When you disable a button via isEnabled you effectively turn off its collider as well, so yes the events will go to the next collider in line -- something below it, like the window's background. This is obvious, no? What are you trying to do?