cocos2d-iphone  2.1
Improved Cocos2D API Reference (iOS version) for www.kobold2d.com developers
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Properties Defines
CCMenuItemLabel Class Reference

#import <CCMenuItem.h>

+ Inheritance diagram for CCMenuItemLabel:
+ Collaboration diagram for CCMenuItemLabel:

List of all members.

Public Member Functions

(id) - initWithLabel:target:selector:
(id) - initWithLabel:block:
(void) - setString:
(void) - setIsEnabled:

Static Public Member Functions

(id) + itemWithLabel:
(id) + itemWithLabel:target:selector:
(id) + itemWithLabel:block:

Protected Attributes

CCNode< CCLabelProtocol,
CCRGBAProtocol > * 
_label
ccColor3B _colorBackup
ccColor3B _disabledColor
float _originalScale

Properties

ccColor3B disabledColor
CCNode< CCLabelProtocol,
CCRGBAProtocol > * 
label

Detailed Description

An abstract class for "label" CCMenuItemLabel items Any CCNode that supports the CCLabelProtocol protocol can be added. Supported nodes:


Member Function Documentation

- (id) initWithLabel: (CCNode< CCLabelProtocol, CCRGBAProtocol > *)  label
block: (id sender)  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
target: (id)  target
selector: (SEL)  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.

creates a CCMenuItemLabel with a Label.

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

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

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

creates a CCMenuItemLabel with a Label, target and selector. The "target" won't be retained.

- (void) setIsEnabled: (BOOL)  enabled

Enable or disabled the CCMenuItemFont

Warning:
setIsEnabled changes the RGB color of the font

Implements CCMenuItem.

- (void) setString: (NSString *)  label

sets a new string to the inner label


Property Documentation

- (ccColor3B) disabledColor [read, write, assign]

the color that will be used to disable the item

- (CCNode<CCLabelProtocol, CCRGBAProtocol>*) label [read, write, assign]

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


The documentation for this class was generated from the following file: