Fix UIButton Scale 9 Highlight

This commit is contained in:
Ahlwong 2014-10-09 12:48:09 -07:00
parent f928046f50
commit 5027f24348
1 changed files with 13 additions and 5 deletions

View File

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