cocos2d-iphone  2.1
Improved Cocos2D API Reference (iOS version) for www.kobold2d.com developers
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Properties Macros Pages
CCLabelAtlas Class Reference

#import <CCLabelAtlas.h>

Inheritance diagram for CCLabelAtlas:
Collaboration diagram for CCLabelAtlas:

Instance Methods

(id) - initWithString:charMapFile:itemWidth:itemHeight:startCharMap:
 
(id) - initWithString:texture:itemWidth:itemHeight:startCharMap:
 
(id) - initWithString:fntFile:
 
 Instance Methods inherited from CCAtlasNode
(id) - initWithTileFile:tileWidth:tileHeight:itemsToRender:
 
(id) - initWithTexture:tileWidth:tileHeight:itemsToRender:
 
(void) - updateAtlasValues
 
 Instance Methods inherited from CCNode
(id) - init
 
(void) - onEnter
 
(void) - onEnterTransitionDidFinish
 
(void) - onExit
 
(void) - onExitTransitionDidStart
 
(void) - addChild:
 
(void) - addChild:z:
 
(void) - addChild:z:tag:
 
(void) - removeFromParent
 
(void) - removeFromParentAndCleanup:
 
(void) - removeChild:
 
(void) - removeChild:cleanup:
 
(void) - removeChildByTag:
 
(void) - removeChildByTag:cleanup:
 
(void) - removeAllChildren
 
(void) - removeAllChildrenWithCleanup:
 
(CCNode *) - getChildByTag:
 
(void) - reorderChild:z:
 
(void) - sortAllChildren
 
(void) - cleanup
 
(void) - draw
 
(void) - visit
 
(void) - transform
 
(void) - transformAncestors
 
(CGRect) - boundingBox
 
(CCAction *) - runAction:
 
(void) - stopAllActions
 
(void) - stopAction:
 
(void) - stopActionByTag:
 
(CCAction *) - getActionByTag:
 
(NSUInteger) - numberOfRunningActions
 
(void) - scheduleUpdate
 
(void) - scheduleUpdateWithPriority:
 
(void) - unscheduleUpdate
 
(void) - schedule:
 
(void) - schedule:interval:
 
(void) - schedule:interval:repeat:delay:
 
(void) - scheduleOnce:delay:
 
(void) - unschedule:
 
(void) - unscheduleAllSelectors
 
(void) - resumeSchedulerAndActions
 
(void) - pauseSchedulerAndActions
 
(void) - update:
 
(CGAffineTransform) - nodeToParentTransform
 
(CGAffineTransform) - parentToNodeTransform
 
(CGAffineTransform) - nodeToWorldTransform
 
(CGAffineTransform) - worldToNodeTransform
 
(CGPoint) - convertToNodeSpace:
 
(CGPoint) - convertToWorldSpace:
 
(CGPoint) - convertToNodeSpaceAR:
 
(CGPoint) - convertToWorldSpaceAR:
 
(CGPoint) - convertTouchToNodeSpace:
 
(CGPoint) - convertTouchToNodeSpaceAR:
 
(void) - setIsRelativeAnchorPoint:
 
(BOOL) - DEPRECATED_ATTRIBUTE
 
(void) - setZOrder:
 
 Instance Methods inherited from <CCRGBAProtocol>
(void) - setColor:
 
(ccColor3B- color
 
(GLubyte) - opacity
 returns the opacity
 
(void) - setOpacity:
 
(void) - setOpacityModifyRGB:
 
(BOOL) - doesOpacityModifyRGB
 
 Instance Methods inherited from <CCTextureProtocol>
(CCTexture2D *) - texture
 
(void) - setTexture:
 
 Instance Methods inherited from <CCBlendProtocol>
(void) - setBlendFunc:
 
(ccBlendFunc- blendFunc
 
 Instance Methods inherited from <CCLabelProtocol>
(void) - setString:
 
(NSString *) - string
 
(void) - setCString:
 

Class Methods

(id) + labelWithString:charMapFile:itemWidth:itemHeight:startCharMap:
 
(id) + labelWithString:fntFile:
 
 Class Methods inherited from CCAtlasNode
(id) + atlasWithTileFile:tileWidth:tileHeight:itemsToRender:
 
 Class Methods inherited from CCNode
(id) + node
 

Protected Attributes

NSString * string_
 
NSUInteger mapStartChar_
 
 Protected Attributes inherited from CCAtlasNode
CCTextureAtlastextureAtlas_
 
NSUInteger itemsPerRow_
 
NSUInteger itemsPerColumn_
 
NSUInteger itemWidth_
 
NSUInteger itemHeight_
 
NSUInteger quadsToDraw_
 
ccBlendFunc blendFunc_
 
GLubyte opacity_
 
ccColor3B color_
 
ccColor3B colorUnmodified_
 
BOOL opacityModifyRGB_
 
GLint uniformColor_
 
 Protected Attributes inherited from CCNode
float rotationX_
 
float rotationY_
 
float scaleX_
 
float scaleY_
 
float vertexZ_
 
CGPoint position_
 
float skewX_
 
float skewY_
 
CGPoint anchorPointInPoints_
 
CGPoint anchorPoint_
 
CGSize contentSize_
 
CGAffineTransform transform_
 
CGAffineTransform inverse_
 
CCCameracamera_
 
CCGridBasegrid_
 
NSInteger zOrder_
 
CCArraychildren_
 
CCNodeparent_
 
NSInteger tag_
 
void * userData_
 
id userObject_
 
CCGLProgramshaderProgram_
 
ccGLServerState glServerState_
 
NSUInteger orderOfArrival_
 
CCSchedulerscheduler_
 
CCActionManageractionManager_
 
BOOL isRunning_
 
BOOL isTransformDirty_
 
BOOL isInverseDirty_
 
BOOL visible_
 
BOOL ignoreAnchorPointForPosition_
 
BOOL isReorderChildDirty_
 

Additional Inherited Members

 Properties inherited from CCAtlasNode
CCTextureAtlastextureAtlas
 
ccBlendFunc blendFunc
 
GLubyte opacity
 
ccColor3B color
 
NSUInteger quadsToDraw
 

Detailed Description

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.

Method Documentation

- (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

Since
v2.0
- (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

Since
v2.0

The documentation for this class was generated from the following file: