Coder Social home page Coder Social logo

ccmenuadvanced's Introduction

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 ;)

ccmenuadvanced's People

Contributors

psineur avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.