diff --git a/cocos/ui/UIButton.cpp b/cocos/ui/UIButton.cpp index a4c6bf7b0f..8e938366c4 100644 --- a/cocos/ui/UIButton.cpp +++ b/cocos/ui/UIButton.cpp @@ -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); + } } }