开发者

How to use attributed Strings with cocos2d?

how to use CCLabelTTF with ZAttributedString? Lets say开发者_如何转开发 I want a blue Text "Greetings to the World!" but I want the word "to" in red.


ZAttributedString is part of FontLabel, an external library from Zynga that is packaged with Cocos2D. FontLabel uses ZFont, not CCLabelTTF, etc ...

Refer to here: https://github.com/zynga/FontLabel

It would appear they provide some very small examples, and you can peek into their UnitTests as well to see additional use cases.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜