Cocos2D-X Menu and MenuCallback

Lets create a Cocos2d-X menu with one callback method.

Overview:

  • Layer which will contain the menu – MainLayer
  • Menu items like labels or images – CCMenuItemImage
  • Menu itself – CCMenu
  • Method for menu callback that will handle events when an item is selected/pressed – menuCallback(CCObject* sender)

Usage


Recent Posts

Recent Comments

Categories