Class CCMenuItemSprite

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

Since v0.8.0

CCMenuItemSprite accepts CCNode<CCRGBAProtocol> objects as items. The images has 3 different states:

  • unselected image
  • selected image
  • disabled image
Examples0
Public static methods3
staticcocos2d::CCMenuItemSprite*create(
cocos2d::CCNode*normalSprite
,
cocos2d::CCNode*selectedSprite
,
cocos2d::CCNode*disabledSprite
)

creates a menu item with a normal, selected and disabled image

staticcocos2d::CCMenuItemSprite*create(
cocos2d::CCNode*normalSprite
,
cocos2d::CCNode*selectedSprite
,,)

creates a menu item with a normal and selected image with target/selector

staticcocos2d::CCMenuItemSprite*create(
cocos2d::CCNode*normalSprite
,
cocos2d::CCNode*selectedSprite
,
cocos2d::CCNode*disabledSprite
,,)

creates a menu item with a normal,selected and disabled image with target/selector

Public member functions10
virtualcocos2d::CCNode*getNormalImage()
No description provided
virtualvoidsetNormalImage()
No description provided
virtualcocos2d::CCNode*getSelectedImage()
No description provided
virtualvoidsetSelectedImage()
No description provided
virtualcocos2d::CCNode*getDisabledImage()
No description provided
virtualvoidsetDisabledImage()
No description provided
boolinitWithNormalSprite(
cocos2d::CCNode*normalSprite
,
cocos2d::CCNode*selectedSprite
,
cocos2d::CCNode*disabledSprite
,,)

initializes a menu item with a normal, selected and disabled image with target/selector

virtualvoidselected()

Since v0.99.5

No description provided
virtualvoidunselected()
No description provided
virtualvoidsetEnabled(
boolbEnabled
)
No description provided
Fields0
Protected member functions1
virtualvoidupdateImagesVisibility()
No description provided
Protected fields3
cocos2d::CCNode*m_pNormalImage
;
No description provided
cocos2d::CCNode*m_pSelectedImage
;
No description provided
cocos2d::CCNode*m_pDisabledImage
;
No description provided