mirror of https://github.com/axmolengine/axmol.git
override setCameraMask
This commit is contained in:
parent
f56d8c4784
commit
5b26ba3c68
|
@ -316,6 +316,14 @@ void ClippingNode::visit(Renderer *renderer, const Mat4 &parentTransform, uint32
|
|||
director->popMatrix(MATRIX_STACK_TYPE::MATRIX_STACK_MODELVIEW);
|
||||
}
|
||||
|
||||
void ClippingNode::setCameraMask(unsigned short mask, bool applyChildren)
|
||||
{
|
||||
Node::setCameraMask(mask, applyChildren);
|
||||
|
||||
if (_stencil)
|
||||
_stencil->setCameraMask(mask, applyChildren);
|
||||
}
|
||||
|
||||
Node* ClippingNode::getStencil() const
|
||||
{
|
||||
return _stencil;
|
||||
|
|
|
@ -104,6 +104,8 @@ public:
|
|||
virtual void onExit() override;
|
||||
virtual void visit(Renderer *renderer, const Mat4 &parentTransform, uint32_t parentFlags) override;
|
||||
|
||||
virtual void setCameraMask(unsigned short mask, bool applyChildren = true) override;
|
||||
|
||||
CC_CONSTRUCTOR_ACCESS:
|
||||
ClippingNode();
|
||||
|
||||
|
|
|
@ -912,6 +912,8 @@ void Label::draw(Renderer *renderer, const Mat4 &transform, uint32_t flags)
|
|||
|
||||
void Label::setCameraMask(unsigned short mask, bool applyChildren)
|
||||
{
|
||||
SpriteBatchNode::setCameraMask(mask, applyChildren);
|
||||
|
||||
if (_textSprite)
|
||||
{
|
||||
_textSprite->setCameraMask(mask, applyChildren);
|
||||
|
|
|
@ -266,7 +266,7 @@ 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;
|
||||
virtual void setCameraMask(unsigned short mask, bool applyChildren = true) 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,
|
||||
|
|
Loading…
Reference in New Issue