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

#import <CCMenuItem.h>

Inheritance diagram for CCMenuItem:
Inheritance graph
[legend]
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 42 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 in points

- (void) selected

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

- (void) setIsEnabled: (BOOL)  enabled

Enable or disabled the CCMenuItem

Implemented in CCMenuItemLabel.

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