Merge pull request #14795 from liamcindy/v3_ui_BMFont

remove error logic for BMFont with newest CCLabel
This commit is contained in:
zilongshanren 2015-12-24 15:39:15 +08:00
commit d5147a86c1
2 changed files with 0 additions and 7 deletions

View File

@ -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;
} }

View File

@ -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;