Inherits from CCLayerRGBA : CCLayer : CCNode : NSObject
Conforms to CCRGBAProtocol
Declared in CCMenu.h

Overview

A CCMenu

Features and Limitation: – You can add MenuItem objects in runtime using addChild: – But the only accecpted children are MenuItem objects

Tasks

Other Methods

Other Methods

Properties

color

conforms to CCRGBAProtocol protocol

@property (nonatomic, readonly) ccColor3B color

Declared In

CCMenu.h

enabled

whether or not the menu will receive events

@property (nonatomic, readwrite) BOOL enabled

Declared In

CCMenu.h

opacity

conforms to CCRGBAProtocol protocol

@property (nonatomic, readonly) GLubyte opacity

Declared In

CCMenu.h

Class Methods

menuWithArray:

creates a CCMenu with a NSArray of CCMenuItem objects

+ (id)menuWithArray:(NSArray *)arrayOfItems

Declared In

CCMenu.h

menuWithItems:

creates a CCMenu with CCMenuItem objects

+ (id)menuWithItems:(CCMenuItem *)item, ...

Declared In

CCMenu.h

menuWithItems:vaList:

creates a CCMenu with CCMenuItem objects

+ (id)menuWithItems:(CCMenuItem *)firstItem vaList:(va_list)args

Declared In

CCMenu.h

Instance Methods

alignItemsHorizontally

align items horizontally

- (void)alignItemsHorizontally

Declared In

CCMenu.h

alignItemsHorizontallyWithPadding:

align items horizontally with padding

- (void)alignItemsHorizontallyWithPadding:(float)padding

Availability

Declared In

CCMenu.h

alignItemsInColumns:

align items in rows of columns

- (void)alignItemsInColumns:(NSNumber *)columns, ...

Declared In

CCMenu.h

alignItemsInColumns:vaList:

alignItemsInColumnsWithArray:

alignItemsInRows:

align items in columns of rows

- (void)alignItemsInRows:(NSNumber *)rows, ...

Declared In

CCMenu.h

alignItemsInRows:vaList:

alignItemsInRowsWithArray:

alignItemsVertically

align items vertically

- (void)alignItemsVertically

Declared In

CCMenu.h

alignItemsVerticallyWithPadding:

align items vertically with padding

- (void)alignItemsVerticallyWithPadding:(float)padding

Availability

Declared In

CCMenu.h

initWithArray:

initializes a CCMenu with a NSArray of CCMenuItem objects

- (id)initWithArray:(NSArray *)arrayOfItems

Declared In

CCMenu.h

initWithItems:vaList:

initializes a CCMenu with it’s items

- (id)initWithItems:(CCMenuItem *)item vaList:(va_list)args

Declared In

CCMenu.h

setHandlerPriority:

set event handler priority. By default it is: kCCMenuTouchPriority

- (void)setHandlerPriority:(NSInteger)newPriority

Declared In

CCMenu.h