MenuItem Class Reference

#import <MenuItem.h>

Inherits CocosNode, CocosNodeSize-p, and CocosNodeOpacity-p.

Inherited by MenuItemAtlasFont, MenuItemFont, MenuItemImage, and MenuItemToggle.

Collaboration diagram for MenuItem:

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
(CGSize) - contentSize

Static Public Member Functions

(id) + itemWithTarget:selector:

Properties

GLubyte opacity


Detailed Description

Menu Item base class

Member Function Documentation

- (void) activate  

Activate the item

- (CGSize) contentSize  

Returns the size in pixels of the texture. Conforms to the CocosNodeSize protocol

Reimplemented from < CocosNodeSize >.

- (id) initWithTarget: (id)  r
selector: (SEL)  s 

Initializes a menu item with a target/selector

- (BOOL) isEnabled  

Returns whether or not the MenuItem is enabled

+ (id) itemWithTarget: (id)  r
selector: (SEL)  s 

Creates a menu item 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 MenuItem

Implemented in MenuItemAtlasFont, and MenuItemFont.

- (void) unselected  

The item was unselected


Property Documentation

- (GLubyte) opacity [read, write, assign]

Opacity property. Conforms to CocosNodeOpacity protocol


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

Generated on Tue Jun 9 10:39:39 2009 for cocos2d for iPhone 0.7.3 by  doxygen 1.5.8