mirror of https://github.com/axmolengine/axmol.git
fix camra mask for label does not work
This commit is contained in:
parent
878590946f
commit
f56d8c4784
|
@ -910,6 +910,18 @@ void Label::draw(Renderer *renderer, const Mat4 &transform, uint32_t flags)
|
|||
}
|
||||
}
|
||||
|
||||
void Label::setCameraMask(unsigned short mask, bool applyChildren)
|
||||
{
|
||||
if (_textSprite)
|
||||
{
|
||||
_textSprite->setCameraMask(mask, applyChildren);
|
||||
}
|
||||
if (_shadowNode)
|
||||
{
|
||||
_shadowNode->setCameraMask(mask, applyChildren);
|
||||
}
|
||||
}
|
||||
|
||||
void Label::createSpriteWithFontDefinition()
|
||||
{
|
||||
_currentLabelType = LabelType::STRING_TEXTURE;
|
||||
|
|
|
@ -266,6 +266,8 @@ public:
|
|||
virtual void visit(Renderer *renderer, const Mat4 &parentTransform, uint32_t parentFlags) override;
|
||||
virtual void draw(Renderer *renderer, const Mat4 &transform, uint32_t flags) override;
|
||||
|
||||
virtual void setCameraMask(unsigned short mask, bool applyChildren) override;
|
||||
|
||||
CC_DEPRECATED_ATTRIBUTE static Label* create(const std::string& text, const std::string& font, float fontSize,
|
||||
const Size& dimensions = Size::ZERO, TextHAlignment hAlignment = TextHAlignment::LEFT,
|
||||
TextVAlignment vAlignment = TextVAlignment::TOP);
|
||||
|
|
Loading…
Reference in New Issue