CCMenu Class Reference
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
-
enabled
whether or not the menu will receive events
property -
+ menuWithItems:
creates a CCMenu with CCMenuItem objects
-
+ menuWithItems:vaList:
creates a CCMenu with CCMenuItem objects
-
+ menuWithArray:
creates a CCMenu with a NSArray of CCMenuItem objects
-
– initWithArray:
initializes a CCMenu with a NSArray of CCMenuItem objects
-
– alignItemsVertically
align items vertically
-
– alignItemsVerticallyWithPadding:
align items vertically with padding
-
– alignItemsHorizontally
align items horizontally
-
– alignItemsHorizontallyWithPadding:
align items horizontally with padding
-
– alignItemsInColumns:
align items in rows of columns
-
– alignItemsInColumns:vaList:
-
– alignItemsInColumnsWithArray:
-
– alignItemsInRows:
align items in columns of rows
-
– alignItemsInRows:vaList:
-
– alignItemsInRowsWithArray:
-
– setHandlerPriority:
set event handler priority. By default it is: kCCMenuTouchPriority
Other Methods
-
– initWithItems:vaList:
initializes a CCMenu with it’s items
-
opacity
conforms to CCRGBAProtocol protocol
property -
color
conforms to CCRGBAProtocol protocol
property
Properties
color
conforms to CCRGBAProtocol protocol
@property (nonatomic, readonly) ccColor3B color
Declared In
CCMenu.h
Class Methods
menuWithArray:
creates a CCMenu with a NSArray of CCMenuItem objects
+ (id)menuWithArray:(NSArray *)arrayOfItems
Declared In
CCMenu.h
Instance Methods
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
alignItemsInRows:
align items in columns of rows
- (void)alignItemsInRows:(NSNumber *)rows, ...
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