mirror of https://github.com/axmolengine/axmol.git
Merge pull request #14795 from liamcindy/v3_ui_BMFont
remove error logic for BMFont with newest CCLabel
This commit is contained in:
commit
d5147a86c1
|
@ -36,7 +36,6 @@ IMPLEMENT_CLASS_GUI_INFO(TextBMFont)
|
||||||
|
|
||||||
TextBMFont::TextBMFont():
|
TextBMFont::TextBMFont():
|
||||||
_labelBMFontRenderer(nullptr),
|
_labelBMFontRenderer(nullptr),
|
||||||
_fntFileHasInit(false),
|
|
||||||
_fntFileName(""),
|
_fntFileName(""),
|
||||||
_stringValue(""),
|
_stringValue(""),
|
||||||
_labelBMFontRendererAdaptDirty(true)
|
_labelBMFontRendererAdaptDirty(true)
|
||||||
|
@ -89,7 +88,6 @@ void TextBMFont::setFntFile(const std::string& fileName)
|
||||||
_fntFileName = fileName;
|
_fntFileName = fileName;
|
||||||
_labelBMFontRenderer->setBMFontFilePath(fileName);
|
_labelBMFontRenderer->setBMFontFilePath(fileName);
|
||||||
|
|
||||||
_fntFileHasInit = true;
|
|
||||||
updateContentSizeWithTextureSize(_labelBMFontRenderer->getContentSize());
|
updateContentSizeWithTextureSize(_labelBMFontRenderer->getContentSize());
|
||||||
_labelBMFontRendererAdaptDirty = true;
|
_labelBMFontRendererAdaptDirty = true;
|
||||||
}
|
}
|
||||||
|
@ -102,10 +100,6 @@ void TextBMFont::setString(const std::string& value)
|
||||||
}
|
}
|
||||||
_stringValue = value;
|
_stringValue = value;
|
||||||
_labelBMFontRenderer->setString(value);
|
_labelBMFontRenderer->setString(value);
|
||||||
if (!_fntFileHasInit)
|
|
||||||
{
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
updateContentSizeWithTextureSize(_labelBMFontRenderer->getContentSize());
|
updateContentSizeWithTextureSize(_labelBMFontRenderer->getContentSize());
|
||||||
_labelBMFontRendererAdaptDirty = true;
|
_labelBMFontRendererAdaptDirty = true;
|
||||||
}
|
}
|
||||||
|
|
|
@ -112,7 +112,6 @@ protected:
|
||||||
virtual void adaptRenderers() override;
|
virtual void adaptRenderers() override;
|
||||||
protected:
|
protected:
|
||||||
Label* _labelBMFontRenderer;
|
Label* _labelBMFontRenderer;
|
||||||
bool _fntFileHasInit;
|
|
||||||
std::string _fntFileName;
|
std::string _fntFileName;
|
||||||
std::string _stringValue;
|
std::string _stringValue;
|
||||||
bool _labelBMFontRendererAdaptDirty;
|
bool _labelBMFontRendererAdaptDirty;
|
||||||
|
|
Loading…
Reference in New Issue