`
xuela_net
  • 浏览: 496611 次
文章分类
社区版块
存档分类
最新评论

CososBuilder2.1 & Cocos2dx2.0.3 ------------>bug

 
阅读更多

So I found that Cocosbuilder assumes a default CCLayerColor opacity of 255, but Cocos2dx defaults to 0. This causes CCLayerColors created in Cocosbuilder to not display if they have a opacity of 255. I fixed this by changing the following in CCLayerColor::init():


CCSize s = CCDirector::sharedDirector()->getWinSize();
return initWithColor(ccc4(0,0,0,0), s.width, s.height);

To:


CCSize s = CCDirector::sharedDirector()->getWinSize();
return initWithColor(ccc4(0,0,0,255), s.width, s.height);

This is similar to what CCLayerGradient already does.


否则不会显示

分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics