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
-
selectedIndex
returns the selected item
property -
subItems
NSMutableArray 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”.
-
– selectedItem
return the selected item
Other Methods
-
opacity
conforms with CCRGBAProtocol protocol
property -
color
conforms 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 color
Declared In
CCMenuItem.h
opacity
conforms with CCRGBAProtocol protocol
@property (nonatomic, readonly) GLubyte opacity
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
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