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

  •   disabledColor

    the color that will be used to disable the item

    property
  •   label

    Label 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

disabledColor

the color that will be used to disable the item

@property (nonatomic, readwrite) ccColor3B disabledColor

Declared In

CCMenuItem.h

label

Label that is rendered. It can be any CCNode that implements the CCLabelProtocol

@property (nonatomic, readwrite, assign) CCNode<CCLabelProtocol,CCRGBAProtocol> *label

Declared In

CCMenuItem.h

Class Methods

itemWithLabel:

creates a CCMenuItemLabel with a Label.

+ (id)itemWithLabel:(CCNode<CCLabelProtocol,CCRGBAProtocol> *)label

Declared In

CCMenuItem.h

itemWithLabel:block:

creates a CCMenuItemLabel with a Label and a block to execute. The block will be “copied”.

+ (id)itemWithLabel:(CCNode<CCLabelProtocol,CCRGBAProtocol> *)label block:(void ( ^ ) ( id sender ))block

Declared In

CCMenuItem.h

itemWithLabel:target:selector:

creates a CCMenuItemLabel with a Label, target and selector. The “target” won’t be retained.

+ (id)itemWithLabel:(CCNode<CCLabelProtocol,CCRGBAProtocol> *)label target:(id)target selector:(SEL)selector

Declared In

CCMenuItem.h

Instance 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 ))block

Declared In

CCMenuItem.h

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.

- (id)initWithLabel:(CCNode<CCLabelProtocol,CCRGBAProtocol> *)label target:(id)target selector:(SEL)selector

Declared In

CCMenuItem.h

setIsEnabled:

Enable or disabled the CCMenuItemFont

- (void)setIsEnabled:(BOOL)enabled

Discussion

Warning: setIsEnabled changes the RGB color of the font

Declared In

CCMenuItem.h

setString:

sets a new string to the inner label

- (void)setString:(NSString *)label

Declared In

CCMenuItem.h