CCLabelAtlas Class Reference
Inherits from | CCAtlasNode : CCNodeRGBA : CCNode : NSObject |
Conforms to | CCLabelProtocol |
Declared in | CCLabelAtlas.h |
Overview
CCLabelAtlas is a subclass of CCAtlasNode.
It can be as a replacement of CCLabel since it is MUCH faster.
CCLabelAtlas versus CCLabel: – CCLabelAtlas is MUCH faster than CCLabel – CCLabelAtlas “characters” have a fixed height and width – CCLabelAtlas “characters” can be anything you want since they are taken from an image file
A more flexible class is CCLabelBMFont. It supports variable width characters and it also has a nice editor.
Tasks
Other Methods
-
+ labelWithString:charMapFile:itemWidth:itemHeight:startCharMap:
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
-
+ labelWithString:fntFile:
creates the CCLabelAtlas with a string and a configuration file
-
– initWithString:charMapFile:itemWidth:itemHeight:startCharMap:
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
-
– initWithString:texture:itemWidth:itemHeight:startCharMap:
initializes the CCLabelAtlas with a string, a texture, the width and height in points of each element and the starting char of the atlas
-
– initWithString:fntFile:
initializes the CCLabelAtlas with a string and a configuration file
Other Methods
-
+ labelAtlasWithString:charMapFile:itemWidth:itemHeight:startCharMap:
creates the CCLabelAtlas with a string, a char map file(the atlas), the width and height of each element and the starting char of the atlas
Class Methods
labelAtlasWithString:charMapFile:itemWidth:itemHeight:startCharMap:
creates the CCLabelAtlas with a string, a char map file(the atlas), the width and height of each element and the starting char of the atlas
+ (id)labelAtlasWithString:(NSString *)string charMapFile:(NSString *)charmapfile itemWidth:(int)w itemHeight:(int)h startCharMap:(char)c
Declared In
CCLabelAtlas.h
labelWithString:charMapFile:itemWidth:itemHeight:startCharMap:
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 charMapFile:(NSString *)charmapfile itemWidth:(NSUInteger)w itemHeight:(NSUInteger)h startCharMap:(NSUInteger)firstElement
Declared In
CCLabelAtlas.h
Instance Methods
initWithString:charMapFile:itemWidth:itemHeight:startCharMap:
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 charMapFile:(NSString *)charmapfile itemWidth:(NSUInteger)w itemHeight:(NSUInteger)h startCharMap:(NSUInteger)firstElement
Declared In
CCLabelAtlas.h
initWithString:fntFile:
initializes the CCLabelAtlas with a string and a configuration file
- (id)initWithString:(NSString *)string fntFile:(NSString *)fontFile
Availability
Declared In
CCLabelAtlas.h
initWithString:texture:itemWidth:itemHeight:startCharMap:
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)initWithString:(NSString *)theString texture:(CCTexture2D *)texture itemWidth:(NSUInteger)w itemHeight:(NSUInteger)h startCharMap:(NSUInteger)c
Declared In
CCLabelAtlas.h