mirror of https://github.com/axmolengine/axmol.git
Label:Fixed the shadow effect of system font might not be shown.
This commit is contained in:
parent
0ac99002d5
commit
5a438ed9a1
|
@ -788,7 +788,9 @@ void Label::enableShadow(const Color4B& shadowColor /* = Color4B::BLACK */,const
|
|||
//TODO: support blur for shadow
|
||||
_shadowBlurRadius = 0;
|
||||
|
||||
if (_textSprite && _shadowNode)
|
||||
if (!_systemFontDirty && !_contentDirty && _textSprite)
|
||||
{
|
||||
if (_shadowNode)
|
||||
{
|
||||
if (shadowColor != _shadowColor4F)
|
||||
{
|
||||
|
@ -801,6 +803,11 @@ void Label::enableShadow(const Color4B& shadowColor /* = Color4B::BLACK */,const
|
|||
_shadowNode->setPosition(_shadowOffset.width, _shadowOffset.height);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
createShadowSpriteForSystemFont();
|
||||
}
|
||||
}
|
||||
|
||||
_shadowColor3B.r = shadowColor.r;
|
||||
_shadowColor3B.g = shadowColor.g;
|
||||
|
|
Loading…
Reference in New Issue