Public Member Functions | Static Public Member Functions

CCLabel Class Reference

#import <CCLabel.h>

Inherits CCSprite, and CCLabelProtocol-p.

Collaboration diagram for CCLabel:
Collaboration graph
[legend]

List of all members.

Public Member Functions

(id) - initWithString:dimensions:alignment:fontName:fontSize:
(id) - initWithString:fontName:fontSize:
(void) - setString:

Static Public Member Functions

(id) + labelWithString:dimensions:alignment:fontName:fontSize:
(id) + labelWithString:fontName:fontSize:

Detailed Description

CCLabel is a subclass of CCTextureNode that knows how to render text labels

All features from CCTextureNode are valid in CCLabel

CCLabel objects are slow. Consider using CCLabelAtlas or CCBitmapFontAtlas instead.

Definition at line 36 of file CCLabel.h.


Member Function Documentation

- (id) initWithString: (NSString *)  string
dimensions: (CGSize)  dimensions
alignment: (UITextAlignment)  alignment
fontName: (NSString *)  name
fontSize: (CGFloat)  size 

initializes the CCLabel with a font name, alignment, dimension and font size

- (id) initWithString: (NSString *)  string
fontName: (NSString *)  name
fontSize: (CGFloat)  size 

initializes the CCLabel with a font name and font size

+ (id) labelWithString: (NSString *)  string
dimensions: (CGSize)  dimensions
alignment: (UITextAlignment)  alignment
fontName: (NSString *)  name
fontSize: (CGFloat)  size 

creates a CCLabel from a fontname, alignment, dimension and font size

+ (id) labelWithString: (NSString *)  string
fontName: (NSString *)  name
fontSize: (CGFloat)  size 

creates a CCLabel from a fontname and font size

- (void) setString: (NSString *)  str  

changes the string to render

Warning:
Changing the string is as expensive as creating a new CCLabel. To obtain better performance use CCLabelAtlas

Reimplemented from <CCLabelProtocol>.


The documentation for this class was generated from the following file:
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Properties Defines

cocos2d for iPhone 0.99.4 API Reference - Generated using Doxygen 1.7.1