Class cc.MenuItemLabel
- Defined in: CCMenuItem.js
- Extends cc.MenuItem
Constructor Attributes | Constructor Name and Description |
---|---|
cc.MenuItemLabel(label, selector, target)
Any cc.Node that supports the cc.LabelProtocol protocol can be added.
|
Method Summary
Class Detail
cc.MenuItemLabel(label, selector, target)
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
var menuitemLabel = new cc.MenuItemLabel(label,selector,target);
Method Detail
-
activate()activate the menu item
-
- Deprecated:
- since v3.0 ,please use new cc.MenuItemLabel(label,selector,target) instead
- Returns:
- {cc.MenuItemLabel}
-
ctor(label, selector, target)Constructor of cc.MenuItemLabel
-
{cc.Color} getDisabledColor()return the disable color for this cc.MenuItemLabel
- Returns:
- {cc.Color}
-
{cc.Node} getLabel()return label of cc.MenuItemLabel
- Returns:
- {cc.Node}
-
{*|string|_p.string|ret.string|q.string|String} getString()return the string of cc.MenuItemLabel
- Returns:
- {*|string|_p.string|ret.string|q.string|String}
-
{Boolean} initWithLabel(label, selector, target)initializes a cc.MenuItemLabel with a label
- Returns:
- {Boolean}
-
selected()menu item is selected (runs callback)
-
setDisabledColor(color)set the disable color for this cc.MenuItemLabel
- Parameters:
- {cc.Color} color
-
setEnabled(enabled)set enable value to cc.MenuItemLabel
- Parameters:
- {Boolean} enabled
-
setLabel(label)set a label for cc.MenuItemLabel
- Parameters:
- {cc.Node} label
-
setString(label)set the string for cc.MenuItemLabel
- Parameters:
- {String} label
-
unselected()menu item goes back to unselected state