Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/psineur/CCMenuAdvanced

Better CCMenu that can be easily used as a patch to CCMenu, not only as a subclass.
https://github.com/psineur/CCMenuAdvanced

Last synced: about 1 month ago
JSON representation

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

Awesome Lists containing this project

README

        

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](https://github.com/cocos2d/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](http://dl.getdropbox.com/u/1765875/CCMenuAdvanced.MOV "CCMenuAdvanced video demo")
Screenshots: [Wiki/Sreenshots](https://github.com/psineur/CCMenuAdvanced/wiki/Screenshots "Screenshots" )

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](https://gist.github.com/886100 "xcf2sprites source") original xcfinfo source: [xcftools](http://henning.makholm.net/software "Henning Makholm.net xcftools")

Developing Universal Mac/iPad/iPhone/Retina Menus
--------------------------------------------------
See commits history, starting from [this commit](https://github.com/psineur/CCMenuAdvanced/commit/6440ee09a59c40706c35780eda04812d4034b3e3 "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](http://parkourdev.blogspot.com/2011/04/universal-macios-menus-with-cocos2d.html "Blogpost")

Russian version of this can be found here: [wiki/Универсальные-Mac-iOS-Retina-меню-с-Cocos2D](https://github.com/psineur/CCMenuAdvanced/wiki/Универсальные-Mac-iOS-Retina-меню-с-Cocos2D "Screenshots" )

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