I am on Cocos2dx 2.2.2, Win 7 Eclipse and when I am setting Display Frame like that:
this->setDisplayFrame(CCSpriteFrameCache::sharedSpriteFrameCache()->spriteFrameByName(btnFrame->getCString()));
black screen occurs. Sound from the game plays normally, but after 15 seconds it stutters and app crashes. I’ve got this method from tutorial on cocos2dx 2.0.1, is it deprecated or should it works?
What is another method to set sprite as this? I try to add sprite and then label so they’re create button which I can pass as first argument to CCMenuItemSprite.