mirror of https://github.com/axmolengine/axmol.git
fixed got wrong Rect by Label::getBoundingBox.
This commit is contained in:
parent
fd5a4acddb
commit
3da695b184
|
@ -1364,6 +1364,13 @@ const Size& Label::getContentSize() const
|
||||||
return Node::getContentSize();
|
return Node::getContentSize();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Rect Label::getBoundingBox() const
|
||||||
|
{
|
||||||
|
const_cast<Label*>(this)->getContentSize();
|
||||||
|
|
||||||
|
return Node::getBoundingBox();
|
||||||
|
}
|
||||||
|
|
||||||
void Label::listenToBackground(EventCustom *event)
|
void Label::listenToBackground(EventCustom *event)
|
||||||
{
|
{
|
||||||
#if CC_ENABLE_CACHE_TEXTURE_DATA
|
#if CC_ENABLE_CACHE_TEXTURE_DATA
|
||||||
|
|
|
@ -243,6 +243,8 @@ public:
|
||||||
|
|
||||||
virtual const Size& getContentSize() const override;
|
virtual const Size& getContentSize() const override;
|
||||||
|
|
||||||
|
virtual Rect getBoundingBox() const;
|
||||||
|
|
||||||
FontAtlas* getFontAtlas() { return _fontAtlas; }
|
FontAtlas* getFontAtlas() { return _fontAtlas; }
|
||||||
/** Listen "come to background" message
|
/** Listen "come to background" message
|
||||||
It only has effect on Android.
|
It only has effect on Android.
|
||||||
|
|
Loading…
Reference in New Issue