|
cocos2d-iphone
2.1
Improved Cocos2D API Reference (iOS version) for www.kobold2d.com developers
|
#import <CCMenuItem.h>
Class Methods | |
| (id) | + itemWithNormalSprite:selectedSprite: |
| (id) | + itemWithNormalSprite:selectedSprite:target:selector: |
| (id) | + itemWithNormalSprite:selectedSprite:disabledSprite:target:selector: |
| (id) | + itemWithNormalSprite:selectedSprite:block: |
| (id) | + itemWithNormalSprite:selectedSprite:disabledSprite:block: |
| (id) | + itemFromNormalSprite:selectedSprite: |
| (id) | + itemFromNormalSprite:selectedSprite:target:selector: |
| (id) | + itemFromNormalSprite:selectedSprite:disabledSprite:target:selector: |
| (id) | + itemFromNormalSprite:selectedSprite:block: |
| (id) | + itemFromNormalSprite:selectedSprite:disabledSprite:block: |
| Class Methods inherited from CCMenuItem | |
| (id) | + itemWithTarget:selector: |
| (id) | + itemWithBlock: |
| Class Methods inherited from CCNode | |
| (id) | + node |
Protected Attributes | |
| CCNode< CCRGBAProtocol > * | _normalImage |
| CCNode< CCRGBAProtocol > * | _selectedImage |
| CCNode< CCRGBAProtocol > * | _disabledImage |
| Protected Attributes inherited from CCMenuItem | |
| void(^ | _block )(id sender) |
| BOOL | _isEnabled |
| BOOL | _isSelected |
| BOOL | _releaseBlockAtCleanup |
| Protected Attributes inherited from CCNode | |
| float | rotationX_ |
| float | rotationY_ |
| float | scaleX_ |
| float | scaleY_ |
| float | vertexZ_ |
| CGPoint | position_ |
| float | skewX_ |
| float | skewY_ |
| CGPoint | anchorPointInPoints_ |
| CGPoint | anchorPoint_ |
| CGSize | contentSize_ |
| CGAffineTransform | transform_ |
| CGAffineTransform | inverse_ |
| CCCamera * | camera_ |
| CCGridBase * | grid_ |
| NSInteger | zOrder_ |
| CCArray * | children_ |
| CCNode * | parent_ |
| NSInteger | tag_ |
| void * | userData_ |
| id | userObject_ |
| CCGLProgram * | shaderProgram_ |
| ccGLServerState | glServerState_ |
| NSUInteger | orderOfArrival_ |
| CCScheduler * | scheduler_ |
| CCActionManager * | actionManager_ |
| BOOL | isRunning_ |
| BOOL | isTransformDirty_ |
| BOOL | isInverseDirty_ |
| BOOL | visible_ |
| BOOL | ignoreAnchorPointForPosition_ |
| BOOL | isReorderChildDirty_ |
Properties | |
| CCNode< CCRGBAProtocol > * | normalImage |
| CCNode< CCRGBAProtocol > * | selectedImage |
| CCNode< CCRGBAProtocol > * | disabledImage |
| Properties inherited from CCMenuItem | |
| BOOL | isSelected |
| BOOL | releaseBlockAtCleanup |
| Properties inherited from CCNode | |
| NSInteger | zOrder |
| float | vertexZ |
| float | skewX |
| float | skewY |
| float | rotation |
| float | rotationX |
| float | rotationY |
| float | scale |
| float | scaleX |
| float | scaleY |
| CGPoint | position |
| CCCamera * | camera |
| CCArray * | children |
| CCGridBase * | grid |
| BOOL | visible |
| CGPoint | anchorPoint |
| CGPoint | anchorPointInPoints |
| CGSize | contentSize |
| BOOL | isRunning |
| CCNode * | parent |
| BOOL | ignoreAnchorPointForPosition |
| NSInteger | tag |
| void * | userData |
| id | userObject |
| CCGLProgram * | shaderProgram |
| NSUInteger | orderOfArrival |
| ccGLServerState | glServerState |
| CCActionManager * | actionManager |
| CCScheduler * | scheduler |
CCMenuItemSprite accepts CCNode<CCRGBAProtocol> objects as items. The images has 3 different states:
| - (id) initWithNormalSprite: | (CCNode< CCRGBAProtocol > *) | normalSprite | |
| selectedSprite: | (CCNode< CCRGBAProtocol > *) | selectedSprite | |
| disabledSprite: | (CCNode< CCRGBAProtocol > *) | disabledSprite | |
| block: | (id sender) | block | |
initializes a menu item with a normal, selected and disabled image with a block. The block will be "copied".
| - (id) initWithNormalSprite: | (CCNode< CCRGBAProtocol > *) | normalSprite | |
| selectedSprite: | (CCNode< CCRGBAProtocol > *) | selectedSprite | |
| disabledSprite: | (CCNode< CCRGBAProtocol > *) | disabledSprite | |
| target: | (id) | target | |
| selector: | (SEL) | selector | |
initializes a menu item with a normal, selected and disabled image with target/selector. The "target" won't be retained.
| + (id) itemWithNormalSprite: | (CCNode< CCRGBAProtocol > *) | normalSprite | |
| selectedSprite: | (CCNode< CCRGBAProtocol > *) | selectedSprite | |
creates a menu item with a normal and selected image
| + (id) itemWithNormalSprite: | (CCNode< CCRGBAProtocol > *) | normalSprite | |
| selectedSprite: | (CCNode< CCRGBAProtocol > *) | selectedSprite | |
| block: | (id sender) | block | |
creates a menu item with a normal and selected image with a block. The block will be "copied".
| + (id) itemWithNormalSprite: | (CCNode< CCRGBAProtocol > *) | normalSprite | |
| selectedSprite: | (CCNode< CCRGBAProtocol > *) | selectedSprite | |
| disabledSprite: | (CCNode< CCRGBAProtocol > *) | disabledSprite | |
| block: | (id sender) | block | |
creates a menu item with a normal, selected and disabled image with a block. The block will be "copied".
| + (id) itemWithNormalSprite: | (CCNode< CCRGBAProtocol > *) | normalSprite | |
| selectedSprite: | (CCNode< CCRGBAProtocol > *) | selectedSprite | |
| disabledSprite: | (CCNode< CCRGBAProtocol > *) | disabledSprite | |
| target: | (id) | target | |
| selector: | (SEL) | selector | |
creates a menu item with a normal, selected and disabled image with target/selector. The "target" won't be retained.
| + (id) itemWithNormalSprite: | (CCNode< CCRGBAProtocol > *) | normalSprite | |
| selectedSprite: | (CCNode< CCRGBAProtocol > *) | selectedSprite | |
| target: | (id) | target | |
| selector: | (SEL) | selector | |
creates a menu item with a normal and selected image with target/selector. The "target" won't be retained.
|
readwritenonatomicassign |
the image used when the item is disabled
|
readwritenonatomicassign |
the image used when the item is not selected
|
readwritenonatomicassign |
the image used when the item is selected