How to set a transparent image as a background?
I want to display a fullscree开发者_JS百科n transparent image anytime there is an active menu button in cocos2d. How do I do that?
If you're looking to provide a popup dialog underlay, you can use CCLayerColor:
CCLayerColor* underlay = [CCLayerColor layerWithColor:ccc4(0, 0, 0, 127)];
[self addChild:underlay z:(something less than your button's z)];
If it has to be a specific image, initialize the image and do the second line above using your CCSprite.
精彩评论