Class cc.MenuItemAtlasFont
Extends
cc.MenuItemLabel.
Defined in: CCMenuItem.js.
Constructor Attributes | Constructor Name and Description |
---|---|
Helper class that creates a MenuItemLabel class with a LabelAtlas
|
- Fields borrowed from class cc.MenuItemLabel:
- RGBAProtocol
Method Attributes | Method Name and Description |
---|---|
<static> |
cc.MenuItemAtlasFont.create(value, charMapFile, itemWidth, itemHeight, startCharMap, target, selector)
create menu item from string with font
|
initWithString(value, charMapFile, itemWidth, itemHeight, startCharMap, selector, target)
|
- Methods borrowed from class cc.MenuItemLabel:
- activate, getColor, getDisabledColor, getLabel, getOpacity, initWithLabel, isOpacityModifyRGB, selected, setColor, setDisabledColor, setEnabled, setLabel, setOpacity, setOpacityModifyRGB, setString, unselected
- Methods borrowed from class cc.MenuItem:
- initWithCallback, isEnabled, isSelected, rect, setCallback, setTarget
- Methods borrowed from class cc.Node:
- addChild, cleanup, convertToNodeSpace, convertToNodeSpaceAR, convertTouchToNodeSpace, convertTouchToNodeSpaceAR, convertToWorldSpace, convertToWorldSpaceAR, ctor, description, draw, 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.MenuItemAtlasFont()
Helper class that creates a MenuItemLabel class with a LabelAtlas
Method Detail
<static>
{cc.MenuItemAtlasFont}
cc.MenuItemAtlasFont.create(value, charMapFile, itemWidth, itemHeight, startCharMap, target, selector)
create menu item from string with font
// Example var item = cc.MenuItemAtlasFont.create('text to display', 'font.fnt', 12, 32, ' ') //OR var item = cc.MenuItemAtlasFont.create('text to display', 'font.fnt', 12, 32, ' ', game, game.run)
- Parameters:
- {String} value
- the text to display
- {String} charMapFile
- the character map file
- {Number} itemWidth
- {Number} itemHeight
- {String} startCharMap
- a single character
- {cc.Node|Null} target
- {function|String|Null} selector
- Returns:
- {cc.MenuItemAtlasFont}
{Boolean}
initWithString(value, charMapFile, itemWidth, itemHeight, startCharMap, selector, target)
- Parameters:
- {String} value
- {String} charMapFile
- {Number} itemWidth
- {Number} itemHeight
- {String} startCharMap
- a single character
- {function|String|Null} selector
- {cc.Node|Null} target
- Returns:
- {Boolean}