Tasharen Entertainment Forum
Support => NGUI 3 Support => Topic started by: sisso on June 12, 2014, 04:20:33 PM
-
I don't know if works as intend or a missing feature. But in NGUI 3.6.1 it is possible to "click" in a button/toggle with UIKeyBinding even when its collider is disable with UIButton.isEnabled == false.
I will disabile it manually with the button, but could be nice if he knows that the widget is "disabled" and ignore the key event.
-
That's correct. The key binding script is a generic script that doesn't have to go on a button. It can go on an input field for example, or can even be used to select units by pressing keys like 1, 2, 3, etc. It wouldn't make much sense for it to check the button's disabled state.
I suggest account for this in your code. In most cases it makes sense to play an error sound anyway.