fixed got wrong Rect by Label::getBoundingBox.

This commit is contained in:
Dhilan007 2014-03-28 11:03:39 +08:00
parent fd5a4acddb
commit 3da695b184
2 changed files with 9 additions and 0 deletions

View File

@ -1364,6 +1364,13 @@ const Size& Label::getContentSize() const
return Node::getContentSize();
}
Rect Label::getBoundingBox() const
{
const_cast<Label*>(this)->getContentSize();
return Node::getBoundingBox();
}
void Label::listenToBackground(EventCustom *event)
{
#if CC_ENABLE_CACHE_TEXTURE_DATA

View File

@ -243,6 +243,8 @@ public:
virtual const Size& getContentSize() const override;
virtual Rect getBoundingBox() const;
FontAtlas* getFontAtlas() { return _fontAtlas; }
/** Listen "come to background" message
It only has effect on Android.