Class CCMenuItem

#include <Geode/cocos/menu_nodes/CCMenuItem.h>
classCCMenuItem:publiccocos2d::CCNodeRGBA{ ... }

CCMenuItem base class

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

Examples0
Public static methods2
staticcocos2d::CCMenuItem*create()

Creates a CCMenuItem with no target/selector

staticcocos2d::CCMenuItem*create(,)

Creates a CCMenuItem with a target/selector

Public member functions12
boolinitWithTarget(,)

Initializes a CCMenuItem with a target/selector

cocos2d::CCRectrect()

Returns the outside box

virtualvoidactivate()

Activate the item

virtualvoidselected()

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

virtualvoidunselected()

The item was unselected

virtualvoidregisterScriptTapHandler(
intnHandler
)

Register menu handler script function

virtualvoidunregisterScriptTapHandler()
No description provided
intgetScriptTapHandler()
No description provided
virtualboolisEnabled()
No description provided
virtualvoidsetEnabled(
boolvalue
)
No description provided
virtualboolisSelected()
No description provided
voidsetTarget(,)

set the target/selector of the menu item

Fields6
boolm_bSelected
;

Since v0.8.2

whether or not the item is selected

boolm_bEnabled
;
No description provided
;
No description provided
;
No description provided
intm_nScriptTapHandler
;
No description provided
floatm_fSizeMult
;
No description provided
Protected member functions0
Protected fields0