![]() |
cocos2d-iphone
1.0.1
Improved Cocos2D API Reference (iOS version) for Kobold2D developers
|
#include <CCLabelAtlas.h>
Public Member Functions | |
id | initWithString:charMapFile:itemWidth:itemHeight:startCharMap: (NSString *string,[charMapFile] NSString *charmapfile,[itemWidth] NSUInteger w,[itemHeight] NSUInteger h,[startCharMap] unsigned char c) |
Static Public Member Functions | |
id | labelWithString:charMapFile:itemWidth:itemHeight:startCharMap: (NSString *string,[charMapFile] NSString *charmapfile,[itemWidth] NSUInteger w,[itemHeight] NSUInteger h,[startCharMap] unsigned char c) |
Protected Attributes | |
NSString * | string_ |
unsigned char | mapStartChar_ |
CCLabelAtlas is a subclass of CCAtlasNode.
It can be as a replacement of CCLabel since it is MUCH faster.
CCLabelAtlas versus CCLabel:
A more flexible class is CCLabelBMFont. It supports variable width characters and it also has a nice editor.
id CCLabelAtlas::initWithString:charMapFile:itemWidth:itemHeight:startCharMap: | ( | NSString * | string, |
[charMapFile] NSString * | charmapfile, | ||
[itemWidth] NSUInteger | w, | ||
[itemHeight] NSUInteger | h, | ||
[startCharMap] unsigned char | c | ||
) | [virtual] |
initializes the CCLabelAtlas with a string, a char map file(the atlas), the width and height in points of each element and the starting char of the atlas
id CCLabelAtlas::labelWithString:charMapFile:itemWidth:itemHeight:startCharMap: | ( | NSString * | string, |
[charMapFile] NSString * | charmapfile, | ||
[itemWidth] NSUInteger | w, | ||
[itemHeight] NSUInteger | h, | ||
[startCharMap] unsigned char | c | ||
) | [static, virtual] |
creates the CCLabelAtlas with a string, a char map file(the atlas), the width and height of each element in points and the starting char of the atlas