mirror of https://github.com/axmolengine/axmol.git
Ensure label underline node has the same global Z value as the label node to fix visibility issue when global Z is not 0. (#373)
This commit is contained in:
parent
fe4f151b1f
commit
429215ee85
|
@ -1444,6 +1444,7 @@ void Label::enableUnderline()
|
||||||
if (!_underlineNode)
|
if (!_underlineNode)
|
||||||
{
|
{
|
||||||
_underlineNode = DrawNode::create();
|
_underlineNode = DrawNode::create();
|
||||||
|
_underlineNode->setGlobalZOrder(getGlobalZOrder());
|
||||||
addChild(_underlineNode, 100000);
|
addChild(_underlineNode, 100000);
|
||||||
_contentDirty = true;
|
_contentDirty = true;
|
||||||
}
|
}
|
||||||
|
@ -2435,6 +2436,11 @@ void Label::setGlobalZOrder(float globalZOrder)
|
||||||
_shadowNode->setGlobalZOrder(globalZOrder);
|
_shadowNode->setGlobalZOrder(globalZOrder);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (_underlineNode)
|
||||||
|
{
|
||||||
|
_underlineNode->setGlobalZOrder(globalZOrder);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
float Label::getRenderingFontSize()const
|
float Label::getRenderingFontSize()const
|
||||||
|
|
Loading…
Reference in New Issue