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:
[legend]

List of all members.

Public Member Functions

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

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.


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 in points

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

The documentation for this class was generated from the following file: