问题
Now I have a CCLayer
of gameplay, where there are a few buttons. And I want to pop up a dialog layer, where there are also a few buttons. How can I deactivate the background buttons and only make the foreground buttons activated?
回答1:
Use CCMenuItem setIsEnabled
method to disable button.
回答2:
What about a lot of buttons on gameplay? Disable every button looks like not the best solution... Is it possible to disactivate all buttons in one fell swoop as topic starter requested?
来源:https://stackoverflow.com/questions/6641031/in-cocos2d-with-buttons-on-multiple-layers-how-can-i-control-which-button-to-r