Public Member Functions | Static Public Member Functions | Properties

CCMenuItem Class Reference

#import <CCMenuItem.h>

Inherits CCNode.

Inherited by CCMenuItemLabel, CCMenuItemSprite, and CCMenuItemToggle.

Collaboration diagram for CCMenuItem:
Collaboration graph
[legend]

List of all members.

Public Member Functions

(id) - initWithTarget:selector:
(CGRect) - rect
(void) - activate
(void) - selected
(void) - unselected
(void) - setIsEnabled:
(BOOL) - isEnabled

Static Public Member Functions

(id) + itemWithTarget:selector:

Properties

BOOL isSelected

Detailed Description

CCMenuItem base class

Subclass CCMenuItem (or any subclass) to create your custom CCMenuItem objects.

Definition at line 41 of file CCMenuItem.h.


Member Function Documentation

- (void) activate  

Activate the item

- (id) initWithTarget: (id)  target
selector: (SEL)  selector 

Initializes a CCMenuItem with a target/selector

- (BOOL) isEnabled  

Returns whether or not the CCMenuItem is enabled

+ (id) itemWithTarget: (id)  target
selector: (SEL)  selector 

Creates a CCMenuItem with a target/selector

- (CGRect) rect  

Returns the outside box

- (void) selected  

The item was selected (not activated), similar to "mouse-over"

- (void) setIsEnabled: (BOOL)  enabled  

Enable or disabled the CCMenuItem

- (void) unselected  

The item was unselected


Property Documentation

- (BOOL) isSelected [read, assign]

returns whether or not the item is selected

Since:
v0.8.2

Definition at line 56 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 0.99.4 API Reference - Generated using Doxygen 1.7.1