Class Index | File Index

Classes


Class cc.MenuItemLabel


Extends cc.MenuItem.

Defined in: CCMenuItem.js.

Class Summary
Constructor Attributes Constructor Name and Description
 
Any cc.Node that supports the cc.LabelProtocol protocol can be added.
Field Summary
Field Attributes Field Name and Description
 
this identifies that this object have implemented RGBAProtocol
Method Summary
Method Attributes Method Name and Description
 
activate the menu item
<static>  
cc.MenuItemLabel.create(label, selector, target)
 
 
 
return label of MenuItemLabel
 
 
initWithLabel(label, selector, target)
 
 
menu item is selected (runs callback)
 
setColor(color)
 
 
setEnabled(enabled)
 
setLabel(label)
 
setOpacity(opacity)
 
 
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
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)
Parameters:
{cc.Node} label
{function|String|Null} selector
{cc.Node|Null} 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)
Parameters:
{cc.Node} label
{function|String} selector
{cc.Node} 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

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