Search code examples
cocos2d-iphone

CCLabelAtlas StartCharMap:':'


I want to make timer string with CCLabelAtlas. The problem is the character, ":". I had added this character in .png file as ":/0123456789". I can see only ":" and can not see any numbers for timer.

enter image description here


Solution

  • AFAIK, cocos2d use startCharacter property to calculate needed symbol position according to ASCII table. For example, the next character in ASCII after ':' is ';', not '/'. Place your characters as they are placed in ASCII and it should be shown fine. The right order is

    /0123456789:
    

    of course, start character in this case will be '/', not ':'