bool ControlColourPicker::init()
{
if (Control::init())
{
setTouchEnabled(true);
// Cache the sprites
SpriteFrameCache::getInstance()->addSpriteFramesWithFile("extensions/CCControlColourPickerSpriteSheet.plist"); // Hard code here
// Create the sprite batch node
SpriteBatchNode *spriteSheet = SpriteBatchNode::create("extensions/CCControlColourPickerSpriteSheet.png"); // Hard code here
addChild(spriteSheet);
- Adds `CC_REQUIRES_NULL_TERMINATION` to methods that require a NULL at the end
- Removes more Hungarian notations in samples
- s/sprite/scene: fix from previous commit
- `CCLog` -> `log`
- `getLayerNamed` -> `getLayer`
- `getPropertyNamed` -> `getProperty`
- and other small fixes
- class order fixes
- static methods (creators) at the beginning
- then constructors / destructors
- then init
- more `const` fixes
- adds some const getters
- some getters have 2 versions: `const` and no-const version
- renamed CocosDenshion::sharedEngine -> getInstance()
... instead of sharedXXX / purgeXXX.
They are more C++ friendly, and also easier to remember.
common files + Mac files + iOS files + tests/samples files were updated.
The old methods are deprecated now.