开发者

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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜