Class cc.MenuItemLabel
- Defined in: CCMenuItem.js
- Extends cc.MenuItem
Constructor Attributes | Constructor Name and Description |
---|---|
Any cc.Node that supports the cc.LabelProtocol protocol can be added.
|
Method Summary
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
Method Detail
-
activate()activate the menu item
-
- 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}
-
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
-
setString(label)
- Parameters:
- {String} label
-
unselected()menu item goes back to unselected state