Merge pull request #8603 from ahlwong/v3

Fix UIButton Scale 9 Highlight
This commit is contained in:
minggo 2014-10-10 10:08:22 +08:00
commit cbc2a5246f
1 changed files with 13 additions and 5 deletions

View File

@ -374,11 +374,19 @@ void Button::onPressStateChangedToNormal()
}
else
{
_buttonNormalRenderer->stopAllActions();
_buttonNormalRenderer->setScale(_normalTextureScaleXInSize, _normalTextureScaleYInSize);
_titleRenderer->stopAllActions();
_titleRenderer->setScaleX(_normalTextureScaleXInSize);
_titleRenderer->setScaleY(_normalTextureScaleYInSize);
if (_scale9Enabled)
{
_buttonNormalRenderer->setColor(Color3B::WHITE);
}
else
{
_buttonNormalRenderer->stopAllActions();
_buttonNormalRenderer->setScale(_normalTextureScaleXInSize, _normalTextureScaleYInSize);
_titleRenderer->stopAllActions();
_titleRenderer->setScaleX(_normalTextureScaleXInSize);
_titleRenderer->setScaleY(_normalTextureScaleYInSize);
}
}
}