![]() |
cocos2d-iphone
2.1
Improved Cocos2D API Reference (iOS version) for www.kobold2d.com developers
|
#import <CCLabelAtlas.h>
Public Member Functions | |
(id) | - initWithString:charMapFile:itemWidth:itemHeight:startCharMap: |
(id) | - initWithString:texture:itemWidth:itemHeight:startCharMap: |
(id) | - initWithString:fntFile: |
Static Public Member Functions | |
(id) | + labelWithString:charMapFile:itemWidth:itemHeight:startCharMap: |
(id) | + labelWithString:fntFile: |
Protected Attributes | |
NSString * | _string |
NSUInteger | _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) initWithString: | (NSString *) | string | |
charMapFile: | (NSString *) | charmapfile | |
itemWidth: | (NSUInteger) | w | |
itemHeight: | (NSUInteger) | h | |
startCharMap: | (NSUInteger) | firstElement | |
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) initWithString: | (NSString *) | string | |
fntFile: | (NSString *) | fontFile | |
initializes the CCLabelAtlas with a string and a configuration file
- (id) initWithString: | (NSString *) | theString | |
texture: | (CCTexture2D *) | texture | |
itemWidth: | (NSUInteger) | w | |
itemHeight: | (NSUInteger) | h | |
startCharMap: | (NSUInteger) | c | |
initializes the CCLabelAtlas with a string, a texture, the width and height in points of each element and the starting char of the atlas
+ (id) labelWithString: | (NSString *) | string | |
charMapFile: | (NSString *) | charmapfile | |
itemWidth: | (NSUInteger) | w | |
itemHeight: | (NSUInteger) | h | |
startCharMap: | (NSUInteger) | firstElement | |
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
+ (id) labelWithString: | (NSString *) | string | |
fntFile: | (NSString *) | fontFile | |
creates the CCLabelAtlas with a string and a configuration file