Inherits from CCMenuItem : CCNodeRGBA : CCNode : NSObject
Conforms to CCRGBAProtocol
Declared in CCMenuItem.h

Overview

A CCMenuItemToggle A simple container class that “toggles” its inner items The inner itmes can be any MenuItem

Tasks

Other Methods

Other Methods

Properties

color

conforms with CCRGBAProtocol protocol

@property (nonatomic, readonly) ccColor3B color

Declared In

CCMenuItem.h

opacity

conforms with CCRGBAProtocol protocol

@property (nonatomic, readonly) GLubyte opacity

Declared In

CCMenuItem.h

selectedIndex

returns the selected item

@property (nonatomic, readwrite) NSUInteger selectedIndex

Declared In

CCMenuItem.h

subItems

NSMutableArray that contains the subitems. You can add/remove items in runtime, and you can replace the array with a new one.

@property (nonatomic, readwrite, retain) NSMutableArray *subItems

Availability

Declared In

CCMenuItem.h

Class Methods

itemWithBlock:items:

creates a menu item from a list of items and executes the given block when the item is selected

+ (id)itemWithBlock:(void ( ^ ) ( id sender ))block items:(CCMenuItem *)item, ...

Declared In

CCMenuItem.h

itemWithItems:

creates a menu item from a list of items.

+ (id)itemWithItems:(NSArray *)arrayOfItems

Declared In

CCMenuItem.h

itemWithItems:block:

creates a menu item from a list of items and executes the given block when the item is selected. The block will be “copied”.

+ (id)itemWithItems:(NSArray *)arrayOfItems block:(void ( ^ ) ( id sender ))block

Declared In

CCMenuItem.h

itemWithTarget:selector:items:

creates a menu item from a list of items with a target/selector

+ (id)itemWithTarget:(id)target selector:(SEL)selector items:(CCMenuItem *)item, ...

Declared In

CCMenuItem.h

itemWithTarget:selector:items:vaList:

Instance Methods

initWithBlock:items:vaList:

initializes a menu item from a list of items with a block

- (id)initWithBlock:(void ( ^ ) ( id ))block items:(CCMenuItem *)item vaList:(va_list)args

Declared In

CCMenuItem.h

initWithItems:block:

initializes a menu item from a list of items with a block. The block will be “copied”.

- (id)initWithItems:(NSArray *)arrayOfItems block:(void ( ^ ) ( id ))block

Declared In

CCMenuItem.h

initWithTarget:selector:items:vaList:

initializes a menu item from a list of items with a target selector

- (id)initWithTarget:(id)t selector:(SEL)s items:(CCMenuItem *)item vaList:(va_list)args

Declared In

CCMenuItem.h

selectedItem

return the selected item

- (CCMenuItem *)selectedItem

Declared In

CCMenuItem.h