mirror of https://github.com/axmolengine/axmol.git
Merge pull request #6036 from Dhilan007/develop_label
fixed got wrong Rect by Label::getBoundingBox.
This commit is contained in:
commit
688ac51546
|
@ -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
|
||||
|
|
|
@ -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.
|
||||
|
|
Loading…
Reference in New Issue