Class Index | File Index

Classes


Class cc.LabelAtlas


Extends cc.AtlasNode.

Defined in: CCLabelAtlas.js.

Class Summary
Constructor Attributes Constructor Name and Description
 
using image file to print text label on the screen, might be a bit slower than cc.Label, similar to cc.LabelBMFont
Method Summary
Method Attributes Method Name and Description
<static>  
cc.LabelAtlas.create()
It accepts two groups of parameters: a) string, fntFile b) label, textureFilename, width, height, startChar
 
draw()
draw the label
 
return the text of this label
 
initializes the cc.LabelAtlas with a string, a char map file(the atlas), the width and height of each element and the starting char of the atlas It accepts two groups of parameters: a) string, fntFile b) label, textureFilename, width, height, startChar
 
setColor(color3)
 
setOpacity(opacity)
 
setString(label)
set the display string
 
Atlas generation
Methods borrowed from class cc.AtlasNode:
getBlendFunc, getColor, getOpacity, getQuadsToDraw, getTexture, getTextureAtlas, initWithTileFile, isOpacityModifyRGB, setBlendFunc, setOpacityModifyRGB, setQuadsToDraw, setTexture, setTextureAtlas
Methods borrowed from class cc.Node:
addChild, cleanup, convertToNodeSpace, convertToNodeSpaceAR, convertTouchToNodeSpace, convertTouchToNodeSpaceAR, convertToWorldSpace, convertToWorldSpaceAR, ctor, description, getActionByTag, getActionManager, getAnchorPoint, getAnchorPointInPoints, getBoundingBox, getBoundingBoxToWorld, getCamera, getChildByTag, getChildren, getChildrenCount, getContentSize, getGLServerState, getGrid, getOrderOfArrival, getParent, getPosition, getPositionX, getPositionY, getRotation, getScale, getScaleX, getScaleY, getScheduler, getShaderProgram, getSkewX, getSkewY, getTag, getUserData, getUserObject, getVertexZ, getZOrder, ignoreAnchorPointForPosition, init, isIgnoreAnchorPointForPosition, isRunning, isVisible, nodeToParentTransform, nodeToWorldTransform, numberOfRunningActions, onEnter, onEnterTransitionDidFinish, onExit, onExitTransitionDidStart, parentToNodeTransform, pauseSchedulerAndActions, release, removeAllChildren, removeAllChildrenWithCleanup, removeChild, removeChildByTag, removeFromParent, removeFromParentAndCleanup, reorderChild, resumeSchedulerAndActions, retain, runAction, schedule, scheduleOnce, scheduleUpdate, scheduleUpdateWithPriority, setActionManager, setAnchorPoint, setContentSize, setGLServerState, setGrid, setNodeDirty, setOrderOfArrival, setParent, setPosition, setPositionX, setPositionY, setRotation, setScale, setScaleX, setScaleY, setScheduler, setShaderProgram, setSkewX, setSkewY, setTag, setUserData, setUserObject, setVertexZ, setVisible, setZOrder, sortAllChildren, stopAction, stopActionByTag, stopAllActions, transform, transformAncestors, unschedule, unscheduleAllCallbacks, unscheduleUpdate, update, updateTransform, visit, worldToNodeTransform
Class Detail
cc.LabelAtlas()
using image file to print text label on the screen, might be a bit slower than cc.Label, similar to cc.LabelBMFont
Method Detail
<static> {cc.LabelAtlas|Null} cc.LabelAtlas.create()
It accepts two groups of parameters: a) string, fntFile b) label, textureFilename, width, height, startChar
//Example
//creates the cc.LabelAtlas with a string, a char map file(the atlas), the width and height of each element and the starting char of the atlas
var myLabel = cc.LabelAtlas.create('Text to display', 'CharMapfile.png', 12, 20, ' ')

//creates the cc.LabelAtlas with a string, a fnt file
var myLabel = cc.LabelAtlas.create('Text to display', 'CharMapFile.plist‘);
Returns:
{cc.LabelAtlas|Null} returns the LabelAtlas object on success

draw()
draw the label

{String} getString()
return the text of this label
Returns:
{String}

{Boolean} initWithString(arg)
initializes the cc.LabelAtlas with a string, a char map file(the atlas), the width and height of each element and the starting char of the atlas It accepts two groups of parameters: a) string, fntFile b) label, textureFilename, width, height, startChar
Parameters:
arg
Returns:
{Boolean} returns true on success

setColor(color3)
Parameters:
{cc.Color3B} color3

setOpacity(opacity)
Parameters:
opacity

setString(label)
set the display string
Parameters:
{String} label

updateAtlasValues()
Atlas generation

Documentation generated by JsDoc Toolkit 2.4.0 on Wed Jan 09 2013 07:51:51 GMT-0800 (PST)