Fixed CCScale9Sprite::create(caInsets, file);

Fixed calling of wrong initializer in CCScale9Sprite, the create(CCRect
capInsets, const char* file). It used to call initWithFile(file,
capInsets), but this is the initializer for a file and a frame rect.
The initializer with capInsets has the capInsets rect as the first
argument. This caused unexpected behaviour.
This commit is contained in:
Marcel Bloemendaal 2013-01-21 14:55:45 +01:00
parent ba111316a7
commit 696ea07495
1 changed files with 1 additions and 1 deletions

View File

@ -468,7 +468,7 @@ bool CCScale9Sprite::initWithFile(CCRect capInsets, const char* file)
CCScale9Sprite* CCScale9Sprite::create(CCRect capInsets, const char* file) CCScale9Sprite* CCScale9Sprite::create(CCRect capInsets, const char* file)
{ {
CCScale9Sprite* pReturn = new CCScale9Sprite(); CCScale9Sprite* pReturn = new CCScale9Sprite();
if ( pReturn && pReturn->initWithFile(file, capInsets) ) if ( pReturn && pReturn->initWithFile(capInsets, file) )
{ {
pReturn->autorelease(); pReturn->autorelease();
return pReturn; return pReturn;