CCMenuItemLabel Class Reference
| Inherits from | CCMenuItem : CCNodeRGBA : CCNode : NSObject |
| Conforms to | CCRGBAProtocol |
| Declared in | CCMenuItem.h |
Overview
An abstract class for “label” CCMenuItemLabel items Any CCNode that supports the CCLabelProtocol protocol can be added. Supported nodes: – CCLabelBMFont – CCLabelAtlas – CCLabelTTF
Tasks
-
disabledColorthe color that will be used to disable the item
property -
labelLabel that is rendered. It can be any CCNode that implements the CCLabelProtocol
property -
+ itemWithLabel:creates a CCMenuItemLabel with a Label.
-
+ itemWithLabel:target:selector:creates a CCMenuItemLabel with a Label, target and selector. The “target” won’t be retained.
-
+ itemWithLabel:block:creates a CCMenuItemLabel with a Label and a block to execute. The block will be “copied”.
-
– initWithLabel:target:selector:initializes a CCMenuItemLabel with a Label, target and selector. Internally it will create a block that executes the target/selector. The “target” won’t be retained.
-
– initWithLabel:block:initializes a CCMenuItemLabel with a Label and a block to execute. The block will be “copied”. This is the designated initializer.
-
– setString:sets a new string to the inner label
-
– setIsEnabled:Enable or disabled the CCMenuItemFont
Properties
Class Methods
itemWithLabel:
creates a CCMenuItemLabel with a Label.
+ (id)itemWithLabel:(CCNode<CCLabelProtocol,CCRGBAProtocol> *)labelDeclared In
CCMenuItem.hInstance Methods
initWithLabel:block:
initializes a CCMenuItemLabel with a Label and a block to execute. The block will be “copied”. This is the designated initializer.
- (id)initWithLabel:(CCNode<CCLabelProtocol,CCRGBAProtocol> *)label block:(void ( ^ ) ( id sender ))blockDeclared In
CCMenuItem.hinitWithLabel:target:selector:
initializes a CCMenuItemLabel with a Label, target and selector. Internally it will create a block that executes the target/selector. The “target” won’t be retained.
- (id)initWithLabel:(CCNode<CCLabelProtocol,CCRGBAProtocol> *)label target:(id)target selector:(SEL)selectorDeclared In
CCMenuItem.h