Skip to content

Better CCMenu that can be easily used as a patch to CCMenu, not only as a subclass.

License

Unknown, Unknown licenses found

Licenses found

Unknown
LICENSE.cocos2d
Unknown
LICENSE.cocosdenshion
Notifications You must be signed in to change notification settings

psineur/CCMenuAdvanced

Repository files navigation

About this Repo

This repository should be used only as example for Universal Cocos2D Menus blogpost.
Latest version of CCMenuAdvanced class can be found in Cocos2d-iPhone-Extensions repository.

CCMenuAdvanced

CCMenuAdvanced is CCMenu with keyboard support for Mac (esc/arrows/enter), a little bit different alignment options, and possibility to slide.It should be easy to add CCMenuAdvanced to CCMenu as a patch, not a subclass. I don't know when i will have time to prepare it for pull request to cocos2d, so feel free to do it instead of me ;)

Short video demo: CCMenuAdvanced.MOV Screenshots: Wiki/Sreenshots

Main features

  • Selecting and activating CCMenuItems with Keyboard (by default next/prev bindings aren't set - set them manually or use one of align methods to bind arrows for this).
  • One of CCMenuItems can be set as escapeDelegate - so it will be activated by pressing escape (useful for back/cancel button, this CCMenuItem escapeDelegate can be even child of other CCMenu)
  • align left->right, right->left, bottom->top, top->bottom with autosetting self contentSize (useful with relativeAnchorPoint=YES to use menu as sprite, not strange-fullscreen-node)
  • externalBoundsRect - if it is set then menu items will be scrollable inside these bounds
  • priority property - for mouse and touch - must be set before onEnter to register with new priority

Demo features

  • Universal Mac / iPad / iPhone / Retina project
  • Demonstrates also how to use CCMenuItemSpriteIndependent with Gimp & xcftools
  • contains xcf2sprites, source original xcfinfo source: xcftools

Developing Universal Mac/iPad/iPhone/Retina Menus

See commits history, starting from this commit to know how exactly universal app can be developed from Mac to iOS and iOS with Retina.

Article about using CCMenuAdvanced for Universal Mac/iOS is available here: parkourDev.blogspot.com

Russian version of this can be found here: wiki/Универсальные-Mac-iOS-Retina-меню-с-Cocos2D

Contribution

Feel free to use, ask, comment, fork, pull request or do whatever you want ;)

About

Better CCMenu that can be easily used as a patch to CCMenu, not only as a subclass.

Resources

License

Unknown, Unknown licenses found

Licenses found

Unknown
LICENSE.cocos2d
Unknown
LICENSE.cocosdenshion

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published