Set global Z value of label debug layer to be the same as the parent label to fix display issue (#378)

This commit is contained in:
RH 2021-06-16 11:18:43 +10:00 committed by GitHub
parent 99cf51df55
commit eff5d1705b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 0 deletions

View File

@ -2441,6 +2441,10 @@ void Label::setGlobalZOrder(float globalZOrder)
{ {
_underlineNode->setGlobalZOrder(globalZOrder); _underlineNode->setGlobalZOrder(globalZOrder);
} }
#if CC_LABEL_DEBUG_DRAW
_debugDrawNode->setGlobalZOrder(globalZOrder);
#endif
} }
float Label::getRenderingFontSize()const float Label::getRenderingFontSize()const