mirror of https://github.com/axmolengine/axmol.git
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:
parent
ba111316a7
commit
696ea07495
|
@ -468,7 +468,7 @@ bool CCScale9Sprite::initWithFile(CCRect capInsets, const char* file)
|
|||
CCScale9Sprite* CCScale9Sprite::create(CCRect capInsets, const char* file)
|
||||
{
|
||||
CCScale9Sprite* pReturn = new CCScale9Sprite();
|
||||
if ( pReturn && pReturn->initWithFile(file, capInsets) )
|
||||
if ( pReturn && pReturn->initWithFile(capInsets, file) )
|
||||
{
|
||||
pReturn->autorelease();
|
||||
return pReturn;
|
||||
|
|
Loading…
Reference in New Issue