mirror of https://github.com/axmolengine/axmol.git
Merge pull request #6022 from Dhilan007/develop_label4565
closed #4565:fixed logical error in Label::setFontAtlas.
This commit is contained in:
commit
c62144c350
|
@ -392,7 +392,16 @@ void Label::setFontAtlas(FontAtlas* atlas,bool distanceFieldEnabled /* = false *
|
||||||
}
|
}
|
||||||
|
|
||||||
_fontAtlas = atlas;
|
_fontAtlas = atlas;
|
||||||
SpriteBatchNode::initWithTexture(_fontAtlas->getTexture(0), 30);
|
|
||||||
|
if (_textureAtlas)
|
||||||
|
{
|
||||||
|
_textureAtlas->setTexture(_fontAtlas->getTexture(0));
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
SpriteBatchNode::initWithTexture(_fontAtlas->getTexture(0), 30);
|
||||||
|
}
|
||||||
|
|
||||||
if (_reusedLetter == nullptr)
|
if (_reusedLetter == nullptr)
|
||||||
{
|
{
|
||||||
_reusedLetter = Sprite::createWithTexture(_fontAtlas->getTexture(0));
|
_reusedLetter = Sprite::createWithTexture(_fontAtlas->getTexture(0));
|
||||||
|
|
Loading…
Reference in New Issue