Reputation: 95
I want to display a fullscreen transparent image anytime there is an active menu button in cocos2d. How do I do that?
Upvotes: 2
Views: 434
Reputation:
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.
Upvotes: 1