|
cocos2d-mac
2.1
Improved Cocos2D API Reference (Mac OS X version) for www.kobold2d.com developers
|
#import <CCMenuItem.h>
Public Member Functions | |
| (id) | - initWithItems:block: |
| (CCMenuItem *) | - selectedItem |
Static Public Member Functions | |
| (id) | + itemWithTarget:selector:items: |
| (id) | + itemWithTarget:selector:items:vaList: |
| (id) | + itemWithItems: |
| (id) | + itemWithItems:block: |
Protected Attributes | |
| NSUInteger | _selectedIndex |
| NSMutableArray * | _subItems |
| CCMenuItem * | _currentItem |
Properties | |
| NSUInteger | selectedIndex |
| NSMutableArray * | subItems |
A CCMenuItemToggle A simple container class that "toggles" its inner items The inner itmes can be any MenuItem
| - (id) initWithItems: | (NSArray *) | arrayOfItems | |
| block: | (id) | block | |
initializes a menu item from a list of items with a block. The block will be "copied".
| + (id) itemWithItems: | (NSArray *) | arrayOfItems |
creates a menu item from a list of items.
| + (id) itemWithItems: | (NSArray *) | arrayOfItems | |
| block: | (id sender) | 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) itemWithTarget: | (id) | target | |
| selector: | (SEL) | selector | |
| items: | (CCMenuItem *) | item | |
| , | NS_REQUIRES_NIL_TERMINATION | ||
creates a menu item from a list of items with a target/selector
| - (CCMenuItem*) selectedItem |
return the selected item
- (NSUInteger) selectedIndex [read, write, assign] |
returns the selected item
- (NSMutableArray*) subItems [read, write, retain] |
NSMutableArray that contains the subitems. You can add/remove items in runtime, and you can replace the array with a new one.