Home

Awesome

CCControlExtension

CCControlExtension is an open-source library which provides a lot of convenient control objects for Cocos2D v1.x for iPhone and Mac such as buttons, sliders or many more... (see the exhaustive list)

All these controls are subclasses of CCControl, which is inspired by the UIControl API from the UIKit of CocoaTouch. The main goal of CCControl is to simplify the creation of control objects in Cocos2D by providing an interface and a base implementation ala UIKit. I.e that this class manages the target-action pair registration and dispatches them to their targets when events occur. For iOS 4.0 or later and Snow Leopard the CCControl also uses the power of blocks to dispatch the events.

Note: The CCControlExtension's classes are ARC compatibles (e.g for use with Kobold2D)

CCControlExtensions

Available Control List

How to use it

The CCControlExtension.h includes all the already controls. There are various examples to understand how the controls works and to use pre-made visual for each of them.

For more informations you can check my blog and the api documentation.

Getting started with the source

The project already include a version of Cocos2D for its examples, so you just need to download the source like the following instructions:

    git clone git@github.com:YannickL/CCControlExtension.git

    # to get latest stable source from master branch, use this command:
    cd CCControlExtension
    git checkout master

    # to update the sources
    git pull

Build & Runtime Requirements

License (MIT)

As well as Cocos2D for iPhone, CCControlExtension is licensed under the MIT License:

Copyright (c) 2013 - Yannick Loriot and contributors (see each file to see the different copyright owners)

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

You can download cocos2d-for-iphone here: https://github.com/cocos2d/cocos2d-iphone