Reputation: 19727
How can I create an attributed label in Cocos2d?
Specifically I'm looking for a label where the color of each word can be unique. I read about ZAttributed string however the Github page no longer exists. Also searching the Cocos2d v2.1-beta2 codebase doesn't turn up anything for attributed string on iOS.
If nothing exists I'll probably just create my own object. I think everything would be straight forward except possibly the spacing between groups of words across a color change boundry.
Upvotes: 0
Views: 257
Reputation: 322
CCLabelBMFont label is a series of textures that can be manipulated like any normal sprite. You can run actions on them, transform them and change their color.
Letters are tagged by their position
CCSprite *gletter = (CCSprite*)[label getChildByTag:0];
Upvotes: 2