Class CCMenuItemImage

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

CCMenuItemImage accepts images as items. The images has 3 different states:

  • unselected image
  • selected image
  • disabled image For best results try that all images are of the same size
Examples0
Public static methods5
staticcocos2d::CCMenuItemImage*create(
charconst*normalImage
,
charconst*selectedImage
)

creates a menu item with a normal and selected image

staticcocos2d::CCMenuItemImage*create(
charconst*normalImage
,
charconst*selectedImage
,
charconst*disabledImage
)

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

staticcocos2d::CCMenuItemImage*create(
charconst*normalImage
,
charconst*selectedImage
,,)

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

staticcocos2d::CCMenuItemImage*create(
charconst*normalImage
,
charconst*selectedImage
,
charconst*disabledImage
,,)

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

staticcocos2d::CCMenuItemImage*create()

Creates an CCMenuItemImage.

Public member functions5
virtualboolinit()
No description provided
boolinitWithNormalImage(
charconst*normalImage
,
charconst*selectedImage
,
charconst*disabledImage
,,)

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

voidsetNormalSpriteFrame()

sets the sprite frame for the normal image

voidsetSelectedSpriteFrame()

sets the sprite frame for the selected image

voidsetDisabledSpriteFrame()

sets the sprite frame for the disabled image

Fields0
Protected member functions0
Protected fields0