cocos2d for iPhone 1.0.0
2D engine for iOS and OS X
Public Member Functions | Static Public Member Functions | Properties
CCMenuItemToggle Class Reference

#import <CCMenuItem.h>

Inheritance diagram for CCMenuItemToggle:
Inheritance graph
[legend]
Collaboration diagram for CCMenuItemToggle:
Collaboration graph
[legend]

List of all members.

Public Member Functions

(id) - initWithTarget:selector:items:vaList:
(CCMenuItem *) - selectedItem

Static Public Member Functions

(id) + itemWithTarget:selector:items:

Properties

GLubyte opacity
ccColor3B color
NSUInteger selectedIndex
NSMutableArray * subItems

Detailed Description

A CCMenuItemToggle A simple container class that "toggles" it's inner items The inner itmes can be any MenuItem

Definition at line 338 of file CCMenuItem.h.


Member Function Documentation

- (id) initWithTarget: (id)  t
selector: (SEL)  s
items: (CCMenuItem *)  item
vaList: (va_list)  args 

initializes a menu item from a list of items with a target selector

+ (id) itemWithTarget: (id)  t
selector: (SEL)  s
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


Property Documentation

- (ccColor3B) color [read, assign]

conforms with CCRGBAProtocol protocol

Definition at line 350 of file CCMenuItem.h.

- (GLubyte) opacity [read, assign]

conforms with CCRGBAProtocol protocol

Definition at line 348 of file CCMenuItem.h.

- (NSUInteger) selectedIndex [read, write, assign]

returns the selected item

Definition at line 353 of file CCMenuItem.h.

- (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.

Since:
v0.7.2

Definition at line 357 of file CCMenuItem.h.


The documentation for this class was generated from the following file:
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Properties Defines

cocos2d for iPhone API Reference - Generated using Doxygen 1.7.4