CCMenuItemSprite Class Reference
| Inherits from | CCMenuItem : CCNodeRGBA : CCNode : NSObject |
| Conforms to | CCRGBAProtocol |
| Declared in | CCMenuItem.h |
Overview
CCMenuItemSprite accepts CCNodeCCRGBAProtocol objects as items. The images has 3 different states: – unselected image – selected image – disabled image
Tasks
Other Methods
-
normalImagethe image used when the item is not selected
property -
selectedImagethe image used when the item is selected
property -
disabledImagethe image used when the item is disabled
property -
+ itemWithNormalSprite:selectedSprite:creates a menu item with a normal and selected image
-
+ itemWithNormalSprite:selectedSprite:target:selector:creates a menu item with a normal and selected image with target/selector. The “target” won’t be retained.
-
+ itemWithNormalSprite:selectedSprite:disabledSprite:target:selector:creates a menu item with a normal, selected and disabled image with target/selector. The “target” won’t be retained.
-
+ itemWithNormalSprite:selectedSprite:block:creates a menu item with a normal and selected image with a block. The block will be “copied”.
-
+ itemWithNormalSprite:selectedSprite:disabledSprite:block:creates a menu item with a normal, selected and disabled image with a block. The block will be “copied”.
-
– initWithNormalSprite:selectedSprite:disabledSprite:target:selector:initializes a menu item with a normal, selected and disabled image with target/selector. The “target” won’t be retained.
-
– initWithNormalSprite:selectedSprite:disabledSprite:block:initializes a menu item with a normal, selected and disabled image with a block. The block will be “copied”.
Other Methods
-
+ itemFromNormalSprite:selectedSprite:creates a menu item with a normal and selected image
-
+ itemFromNormalSprite:selectedSprite:target:selector:creates a menu item with a normal and selected image with target/selector
-
+ itemFromNormalSprite:selectedSprite:disabledSprite:target:selector:creates a menu item with a normal,selected and disabled image with target/selector
-
– initFromNormalSprite:selectedSprite:disabledSprite:target:selector:initializes a menu item with a normal, selected and disabled image with target/selector
-
+ itemFromNormalSprite:selectedSprite:block:creates a menu item with a normal and selected image with target/selector
-
+ itemFromNormalSprite:selectedSprite:disabledSprite:block:creates a menu item with a normal,selected and disabled image with target/selector
-
– initFromNormalSprite:selectedSprite:disabledSprite:block:initializes a menu item with a normal, selected and disabled image with target/selector
Properties
disabledImage
the image used when the item is disabled
@property (nonatomic, readwrite, assign) CCNode<CCRGBAProtocol> *disabledImageDeclared In
CCMenuItem.hClass Methods
itemFromNormalSprite:selectedSprite:
creates a menu item with a normal and selected image
+ (id)itemFromNormalSprite:(CCNode<CCRGBAProtocol> *)normalSprite selectedSprite:(CCNode<CCRGBAProtocol> *)selectedSpriteDeclared In
CCMenuItem.hitemFromNormalSprite:selectedSprite:block:
creates a menu item with a normal and selected image with target/selector
+ (id)itemFromNormalSprite:(CCNode<CCRGBAProtocol> *)normalSprite selectedSprite:(CCNode<CCRGBAProtocol> *)selectedSprite block:(void ( ^ ) ( id sender ))blockDeclared In
CCMenuItem.hitemFromNormalSprite:selectedSprite:disabledSprite:block:
creates a menu item with a normal,selected and disabled image with target/selector
+ (id)itemFromNormalSprite:(CCNode<CCRGBAProtocol> *)normalSprite selectedSprite:(CCNode<CCRGBAProtocol> *)selectedSprite disabledSprite:(CCNode<CCRGBAProtocol> *)disabledSprite block:(void ( ^ ) ( id sender ))blockDeclared In
CCMenuItem.hitemFromNormalSprite:selectedSprite:disabledSprite:target:selector:
creates a menu item with a normal,selected and disabled image with target/selector
+ (id)itemFromNormalSprite:(CCNode<CCRGBAProtocol> *)normalSprite selectedSprite:(CCNode<CCRGBAProtocol> *)selectedSprite disabledSprite:(CCNode<CCRGBAProtocol> *)disabledSprite target:(id)target selector:(SEL)selectorDeclared In
CCMenuItem.hitemFromNormalSprite:selectedSprite:target:selector:
creates a menu item with a normal and selected image with target/selector
+ (id)itemFromNormalSprite:(CCNode<CCRGBAProtocol> *)normalSprite selectedSprite:(CCNode<CCRGBAProtocol> *)selectedSprite target:(id)target selector:(SEL)selectorDeclared In
CCMenuItem.hitemWithNormalSprite:selectedSprite:
creates a menu item with a normal and selected image
+ (id)itemWithNormalSprite:(CCNode<CCRGBAProtocol> *)normalSprite selectedSprite:(CCNode<CCRGBAProtocol> *)selectedSpriteDeclared In
CCMenuItem.hitemWithNormalSprite:selectedSprite: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 block:(void ( ^ ) ( id sender ))blockDeclared In
CCMenuItem.hitemWithNormalSprite:selectedSprite:disabledSprite: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 block:(void ( ^ ) ( id sender ))blockDeclared In
CCMenuItem.hitemWithNormalSprite:selectedSprite:disabledSprite:target: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 disabledSprite:(CCNode<CCRGBAProtocol> *)disabledSprite target:(id)target selector:(SEL)selectorDeclared In
CCMenuItem.hitemWithNormalSprite:selectedSprite:target:selector:
creates a menu item with a normal and selected image with target/selector. The “target” won’t be retained.
+ (id)itemWithNormalSprite:(CCNode<CCRGBAProtocol> *)normalSprite selectedSprite:(CCNode<CCRGBAProtocol> *)selectedSprite target:(id)target selector:(SEL)selectorDeclared In
CCMenuItem.hInstance Methods
initFromNormalSprite:selectedSprite:disabledSprite:block:
initializes a menu item with a normal, selected and disabled image with target/selector
- (id)initFromNormalSprite:(CCNode<CCRGBAProtocol> *)normalSprite selectedSprite:(CCNode<CCRGBAProtocol> *)selectedSprite disabledSprite:(CCNode<CCRGBAProtocol> *)disabledSprite block:(void ( ^ ) ( id sender ))blockDeclared In
CCMenuItem.hinitFromNormalSprite:selectedSprite:disabledSprite:target:selector:
initializes a menu item with a normal, selected and disabled image with target/selector
- (id)initFromNormalSprite:(CCNode<CCRGBAProtocol> *)normalSprite selectedSprite:(CCNode<CCRGBAProtocol> *)selectedSprite disabledSprite:(CCNode<CCRGBAProtocol> *)disabledSprite target:(id)target selector:(SEL)selectorDeclared In
CCMenuItem.hinitWithNormalSprite:selectedSprite:disabledSprite: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 block:(void ( ^ ) ( id sender ))blockDeclared In
CCMenuItem.hinitWithNormalSprite:selectedSprite:disabledSprite:target:selector:
initializes a menu item with a normal, selected and disabled image with target/selector. The “target” won’t be retained.
- (id)initWithNormalSprite:(CCNode<CCRGBAProtocol> *)normalSprite selectedSprite:(CCNode<CCRGBAProtocol> *)selectedSprite disabledSprite:(CCNode<CCRGBAProtocol> *)disabledSprite target:(id)target selector:(SEL)selectorDeclared In
CCMenuItem.h