![]() |
cocos2d-iphone
2.1
Improved Cocos2D API Reference (iOS version) for www.kobold2d.com developers
|
#import <CCMenuItem.h>
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 |
An abstract class for "label" CCMenuItemLabel items Any CCNode that supports the CCLabelProtocol protocol can be added. Supported nodes:
- (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.
+ (id) itemWithLabel: | (CCNode< CCLabelProtocol, CCRGBAProtocol > *) | label |
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
Implements CCMenuItem.
- (void) setString: | (NSString *) | label |
sets a new string to the inner label
- (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