mirror of https://github.com/axmolengine/axmol.git
Merge pull request #8554 from newnon/v3_scale9sprite_capinets_fix
Scale9Sprite capInsets set fix
This commit is contained in:
commit
4a193c6d76
|
@ -828,7 +828,7 @@ y+=ytranslate; \
|
|||
void Scale9Sprite::setSpriteFrame(SpriteFrame * spriteFrame, const Rect& capInsets)
|
||||
{
|
||||
Sprite * sprite = Sprite::createWithTexture(spriteFrame->getTexture());
|
||||
this->updateWithSprite(sprite, spriteFrame->getRect(), spriteFrame->isRotated(), spriteFrame->getOffset(), spriteFrame->getOriginalSize(), Rect::ZERO);
|
||||
this->updateWithSprite(sprite, spriteFrame->getRect(), spriteFrame->isRotated(), spriteFrame->getOffset(), spriteFrame->getOriginalSize(), capInsets);
|
||||
|
||||
// Reset insets
|
||||
this->_insetLeft = capInsets.origin.x;
|
||||
|
|
Loading…
Reference in New Issue