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
-
normalImage
the image used when the item is not selected
property -
selectedImage
the image used when the item is selected
property -
disabledImage
the 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> *disabledImage
Declared In
CCMenuItem.h
Class Methods
itemFromNormalSprite:selectedSprite:
creates a menu item with a normal and selected image
+ (id)itemFromNormalSprite:(CCNode<CCRGBAProtocol> *)normalSprite selectedSprite:(CCNode<CCRGBAProtocol> *)selectedSprite
Declared In
CCMenuItem.h
itemFromNormalSprite: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 ))block
Declared In
CCMenuItem.h
itemFromNormalSprite: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 ))block
Declared In
CCMenuItem.h
itemFromNormalSprite: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)selector
Declared In
CCMenuItem.h
itemFromNormalSprite: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)selector
Declared In
CCMenuItem.h
itemWithNormalSprite:selectedSprite:
creates a menu item with a normal and selected image
+ (id)itemWithNormalSprite:(CCNode<CCRGBAProtocol> *)normalSprite selectedSprite:(CCNode<CCRGBAProtocol> *)selectedSprite
Declared In
CCMenuItem.h
itemWithNormalSprite: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 ))block
Declared In
CCMenuItem.h
itemWithNormalSprite: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 ))block
Declared In
CCMenuItem.h
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.
+ (id)itemWithNormalSprite:(CCNode<CCRGBAProtocol> *)normalSprite selectedSprite:(CCNode<CCRGBAProtocol> *)selectedSprite disabledSprite:(CCNode<CCRGBAProtocol> *)disabledSprite target:(id)target selector:(SEL)selector
Declared In
CCMenuItem.h
itemWithNormalSprite: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)selector
Declared In
CCMenuItem.h
Instance 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 ))block
Declared In
CCMenuItem.h
initFromNormalSprite: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)selector
Declared In
CCMenuItem.h
initWithNormalSprite: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 ))block
Declared In
CCMenuItem.h
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.
- (id)initWithNormalSprite:(CCNode<CCRGBAProtocol> *)normalSprite selectedSprite:(CCNode<CCRGBAProtocol> *)selectedSprite disabledSprite:(CCNode<CCRGBAProtocol> *)disabledSprite target:(id)target selector:(SEL)selector
Declared In
CCMenuItem.h