cocos2d/cocos2d-x — pull request #3033 by gelldur (2013-06-29 12:24:05+00:00)
Title: Improvement cccontroll button

Litle fix in CCControllUtils in CCRectUnion. Also i changed CCScale9Sprite to CCNode now you can set fixed sprite as a button.

It should be working with old CCScale9Sprite (i have tested it) but now TestCPP is corrupted (without my changes too), but when i tested it before pull from master everything works great.

Thanks to that change you can pass normal CCSprite as a button and it shouldn't stretch.

For example

CCControlButton* pButton3 = CCControlButton::create (
CCSprite::create ( "test/hw2.png" ) );
pButton3->setPosition ( 200, 200 );
addChild ( pButton3 );