Inherits from CCMenuItemSprite : CCMenuItem : CCNodeRGBA : CCNode : NSObject
Declared in CCMenuItem.h

Overview

CCMenuItemImage accepts images as items. The images has 3 different states: – unselected image – selected image – disabled image

For best results try that all images are of the same size

Tasks

Other Methods

Other Methods

Class Methods

itemFromNormalImage:selectedImage:

creates a menu item with a normal and selected image

+ (id)itemFromNormalImage:(NSString *)value selectedImage:(NSString *)value2

Declared In

CCMenuItem.h

itemFromNormalImage:selectedImage:block:

creates a menu item with a normal and selected image with target/selector

+ (id)itemFromNormalImage:(NSString *)value selectedImage:(NSString *)value2 block:(void ( ^ ) ( id sender ))block

Declared In

CCMenuItem.h

itemFromNormalImage:selectedImage:disabledImage:block:

creates a menu item with a normal,selected and disabled image with target/selector

+ (id)itemFromNormalImage:(NSString *)value selectedImage:(NSString *)value2 disabledImage:(NSString *)value3 block:(void ( ^ ) ( id sender ))block

Declared In

CCMenuItem.h

itemFromNormalImage:selectedImage:disabledImage:target:selector:

creates a menu item with a normal,selected and disabled image with target/selector

+ (id)itemFromNormalImage:(NSString *)value selectedImage:(NSString *)value2 disabledImage:(NSString *)value3 target:(id)r selector:(SEL)s

Declared In

CCMenuItem.h

itemFromNormalImage:selectedImage:target:selector:

creates a menu item with a normal and selected image with target/selector

+ (id)itemFromNormalImage:(NSString *)value selectedImage:(NSString *)value2 target:(id)r selector:(SEL)s

Declared In

CCMenuItem.h

itemWithNormalImage:selectedImage:

creates a menu item with a normal and selected image

+ (id)itemWithNormalImage:(NSString *)value selectedImage:(NSString *)value2

Declared In

CCMenuItem.h

itemWithNormalImage:selectedImage:block:

creates a menu item with a normal and selected image with a block. The block will be “copied”.

+ (id)itemWithNormalImage:(NSString *)value selectedImage:(NSString *)value2 block:(void ( ^ ) ( id sender ))block

Declared In

CCMenuItem.h

itemWithNormalImage:selectedImage:disabledImage:

creates a menu item with a normal, selected and disabled image

+ (id)itemWithNormalImage:(NSString *)value selectedImage:(NSString *)value2 disabledImage:(NSString *)value3

Declared In

CCMenuItem.h

itemWithNormalImage:selectedImage:disabledImage:block:

creates a menu item with a normal, selected and disabled image with a block. The block will be “copied”.

+ (id)itemWithNormalImage:(NSString *)value selectedImage:(NSString *)value2 disabledImage:(NSString *)value3 block:(void ( ^ ) ( id sender ))block

Declared In

CCMenuItem.h

itemWithNormalImage:selectedImage:disabledImage:target:selector:

creates a menu item with a normal, selected and disabled image with target/selector. The “target” won’t be retained.

+ (id)itemWithNormalImage:(NSString *)value selectedImage:(NSString *)value2 disabledImage:(NSString *)value3 target:(id)r selector:(SEL)s

Declared In

CCMenuItem.h

itemWithNormalImage:selectedImage:target:selector:

creates a menu item with a normal and selected image with target/selector

+ (id)itemWithNormalImage:(NSString *)value selectedImage:(NSString *)value2 target:(id)r selector:(SEL)s

Declared In

CCMenuItem.h

Instance Methods

initFromNormalImage:selectedImage:disabledImage:block:

initializes a menu item with a normal, selected and disabled image with target/selector

- (id)initFromNormalImage:(NSString *)value selectedImage:(NSString *)value2 disabledImage:(NSString *)value3 block:(void ( ^ ) ( id sender ))block

Declared In

CCMenuItem.h

initFromNormalImage:selectedImage:disabledImage:target:selector:

initializes a menu item with a normal, selected and disabled image with target/selector

- (id)initFromNormalImage:(NSString *)value selectedImage:(NSString *)value2 disabledImage:(NSString *)value3 target:(id)r selector:(SEL)s

Declared In

CCMenuItem.h

initWithNormalImage:selectedImage:disabledImage:block:

initializes a menu item with a normal, selected and disabled image with a block. The block will be “copied”.

- (id)initWithNormalImage:(NSString *)value selectedImage:(NSString *)value2 disabledImage:(NSString *)value3 block:(void ( ^ ) ( id sender ))block

Declared In

CCMenuItem.h

initWithNormalImage:selectedImage:disabledImage:target:selector:

initializes a menu item with a normal, selected and disabled image with target/selector. The “target” won’t be retained.

- (id)initWithNormalImage:(NSString *)value selectedImage:(NSString *)value2 disabledImage:(NSString *)value3 target:(id)r selector:(SEL)s

Declared In

CCMenuItem.h

setDisabledSpriteFrame:

sets the sprite frame for the disabled image

- (void)setDisabledSpriteFrame:(CCSpriteFrame *)frame

Declared In

CCMenuItem.h

setNormalSpriteFrame:

sets the sprite frame for the normal image

- (void)setNormalSpriteFrame:(CCSpriteFrame *)frame

Declared In

CCMenuItem.h

setSelectedSpriteFrame:

sets the sprite frame for the selected image

- (void)setSelectedSpriteFrame:(CCSpriteFrame *)frame

Declared In

CCMenuItem.h