Merge pull request #6036 from Dhilan007/develop_label

fixed got wrong Rect by Label::getBoundingBox.
This commit is contained in:
minggo 2014-03-28 11:18:50 +08:00
commit 688ac51546
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.