Contains various utility functions related to CCMenuItem
set of classes.
Struct CCMenuItemExt
Fields0
Examples0
Public static methods11
staticcocos2d::CCMenuItem*create()
Creates a CCMenuItem
with a callback.
callback
staticcocos2d::CCMenuItemSprite*createSprite(cocos2d::CCNode*normalSprite,cocos2d::CCNode*selectedSprite,)
Creates a CCMenuItemSprite
with a normal and a selected sprite.
normalSprite
selectedSprite
callback
staticcocos2d::CCMenuItemSprite*createSprite(cocos2d::CCNode*normalSprite,cocos2d::CCNode*selectedSprite,cocos2d::CCNode*disabledSprite,)
Creates a CCMenuItemSprite
with a disabled, normal and a selected sprite.
normalSprite
selectedSprite
disabledSprite
callback
staticCCMenuItemSpriteExtra*createSpriteExtra(cocos2d::CCNode*normalSprite,)
Creates a CCMenuItemSpriteExtra
with a sprite and a callback.
normalSprite
callback
staticCCMenuItemSpriteExtra*createSpriteExtraWithFilename(std::string_viewnormalSpriteName,floatscale,)
Creates a CCMenuItemSpriteExtra
with a file name and a sprite scale.
normalSpriteName
scale
callback
staticCCMenuItemSpriteExtra*createSpriteExtraWithFrameName(std::string_viewnormalSpriteName,floatscale,)
Creates a CCMenuItemSpriteExtra
with a frame name and a sprite scale.
normalSpriteName
scale
callback
staticCCMenuItemToggler*createToggler(cocos2d::CCNode*onSprite,cocos2d::CCNode*offSprite,)
Creates a CCMenuItemToggler
with an on and off sprite.
onSprite
offSprite
callback
staticCCMenuItemToggler*createTogglerWithStandardSprites(floatscale,)
Creates a CCMenuItemToggler
with standard toggle sprites GD uses.
scale
callback
staticCCMenuItemToggler*createTogglerWithFilename(std::string_viewonSpriteName,std::string_viewoffSpriteName,floatscale,)
Creates a CCMenuItemToggler
with an on and off sprite file name
onSpriteName
offSpriteName
callback
staticCCMenuItemToggler*createTogglerWithFrameName(std::string_viewonSpriteName,std::string_viewoffSpriteName,floatscale,)
Creates a CCMenuItemToggler
with an on and off sprite frame name
onSpriteName
offSpriteName
callback
template<class Node>staticvoidassignCallback(,)
Assigns a lambda callback to a CCMenuItem
item
callback