CCMenuItemToggle Class Reference
| 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
-
selectedIndexreturns the selected item
property -
subItemsNSMutableArray that contains the subitems. You can add/remove items in runtime, and you can replace the array with a new one.
property -
+ itemWithTarget:selector:items:creates a menu item from a list of items with a target/selector
-
+ itemWithTarget:selector:items:vaList: -
+ itemWithItems:creates a menu item from a list of items.
-
+ 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”.
-
– initWithItems:block:initializes a menu item from a list of items with a block. The block will be “copied”.
-
– selectedItemreturn the selected item
Other Methods
-
opacityconforms with CCRGBAProtocol protocol
property -
colorconforms with CCRGBAProtocol protocol
property -
– initWithTarget:selector:items:vaList:initializes a menu item from a list of items with a target selector
-
+ itemWithBlock:items:creates a menu item from a list of items and executes the given block when the item is selected
-
– initWithBlock:items:vaList:initializes a menu item from a list of items with a block
Properties
color
conforms with CCRGBAProtocol protocol
@property (nonatomic, readonly) ccColor3B colorDeclared In
CCMenuItem.hopacity
conforms with CCRGBAProtocol protocol
@property (nonatomic, readonly) GLubyte opacityDeclared In
CCMenuItem.hClass 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.hitemWithItems:
creates a menu item from a list of items.
+ (id)itemWithItems:(NSArray *)arrayOfItemsDeclared In
CCMenuItem.hitemWithItems: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 ))blockDeclared In
CCMenuItem.hInstance 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)argsDeclared In
CCMenuItem.hinitWithItems: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 ))blockDeclared In
CCMenuItem.h