cocos2d-iphone  1.0.1
Improved Cocos2D API Reference (iOS version) for Kobold2D developers
CCMenuItem Interface Reference

#include <CCMenuItem.h>

+ Inheritance diagram for CCMenuItem:
+ Collaboration diagram for CCMenuItem:

List of all members.

Public Member Functions

id initWithTarget:selector: (id target,[selector] SEL selector)
CGRect rect ()
void activate ()
void selected ()
void unselected ()
void setIsEnabled: (BOOL enabled)
BOOL isEnabled ()

Static Public Member Functions

id itemWithTarget:selector: (id target,[selector] SEL selector)

Protected Attributes

NSInvocation * invocation_
BOOL isEnabled_
BOOL isSelected_

Properties

BOOL isSelected

Detailed Description

CCMenuItem base class

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


Member Function Documentation

void CCMenuItem::activate ( ) [virtual]

Activate the item

id CCMenuItem::initWithTarget:selector: ( id  target,
[selector] SEL  selector 
) [virtual]

Initializes a CCMenuItem with a target/selector

BOOL CCMenuItem::isEnabled ( ) [virtual]

Returns whether or not the CCMenuItem is enabled

id CCMenuItem::itemWithTarget:selector: ( id  target,
[selector] SEL  selector 
) [static, virtual]

Creates a CCMenuItem with a target/selector

CGRect CCMenuItem::rect ( ) [virtual]

Returns the outside box in points

void CCMenuItem::selected ( ) [virtual]

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

void CCMenuItem::setIsEnabled: ( BOOL  enabled) [virtual]

Enable or disabled the CCMenuItem

Implemented in CCMenuItemLabel.

void CCMenuItem::unselected ( ) [virtual]

The item was unselected


Property Documentation

BOOL CCMenuItem::isSelected [read, assign]

returns whether or not the item is selected

Since:
v0.8.2

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