开发者

How to set a transparent image as a background?

开发者 https://www.devze.com 2023-03-31 22:03 出处:网络
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 CCL

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

精彩评论

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