|
cocos2d-iphone
2.0
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. Block will benil
| + (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