Class cc.MenuItemLabel
Extends
cc.MenuItem.
Defined in: CCMenuItem.js.
Constructor Attributes | Constructor Name and Description |
---|---|
Any cc.Node that supports the cc.LabelProtocol protocol can be added.
|
Field Attributes | Field Name and Description |
---|---|
this identifies that this object have implemented RGBAProtocol
|
Method Attributes | Method Name and Description |
---|---|
activate()
activate the menu item
|
|
<static> |
cc.MenuItemLabel.create(label, selector, target)
|
getColor()
|
|
getLabel()
return label of MenuItemLabel
|
|
initWithLabel(label, selector, target)
|
|
selected()
menu item is selected (runs callback)
|
|
setColor(color)
|
|
setDisabledColor(color)
|
|
setEnabled(enabled)
|
|
setLabel(label)
|
|
setOpacity(opacity)
|
|
setOpacityModifyRGB(value)
|
|
setString(label)
|
|
menu item goes back to unselected state
|
- 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.MenuItemLabel()
Any cc.Node that supports the cc.LabelProtocol protocol can be added.
Supported nodes:
- cc.BitmapFontAtlas
- cc.LabelAtlas
- cc.LabelTTF
Supported nodes:
- cc.BitmapFontAtlas
- cc.LabelAtlas
- cc.LabelTTF
Field Detail
{Boolean}
RGBAProtocol
this identifies that this object have implemented RGBAProtocol
Method Detail
activate()
activate the menu item
<static>
{cc.MenuItemLabel}
cc.MenuItemLabel.create(label, selector, target)
- Returns:
- {cc.MenuItemLabel}
{cc.Color3B}
getColor()
- Returns:
- {cc.Color3B}
{cc.Color3B}
getDisabledColor()
- Returns:
- {cc.Color3B}
{cc.Node}
getLabel()
return label of MenuItemLabel
- Returns:
- {cc.Node}
{Number}
getOpacity()
- Returns:
- {Number}
{Boolean}
initWithLabel(label, selector, target)
- Returns:
- {Boolean}
isOpacityModifyRGB()
selected()
menu item is selected (runs callback)
setColor(color)
- Parameters:
- {cc.Color3B} color
setDisabledColor(color)
- Parameters:
- {cc.Color3B} color
setEnabled(enabled)
- Parameters:
- {Boolean} enabled
setLabel(label)
- Parameters:
- {cc.Node} label
setOpacity(opacity)
- Parameters:
- {Number} opacity
- from 0-255
setOpacityModifyRGB(value)
- Parameters:
- value
setString(label)
- Parameters:
- {String} label
unselected()
menu item goes back to unselected state