mirror of https://github.com/axmolengine/axmol.git
Merge pull request #8823 from super626/v3
add isVisibleByVisitingCamera check
This commit is contained in:
commit
bca15538e3
|
@ -271,7 +271,7 @@ void ProtectedNode::reorderProtectedChild(cocos2d::Node *child, int localZOrder)
|
|||
void ProtectedNode::visit(Renderer* renderer, const Mat4 &parentTransform, uint32_t parentFlags)
|
||||
{
|
||||
// quick return if not visible. children won't be drawn.
|
||||
if (!_visible)
|
||||
if (!_visible || !isVisitableByVisitingCamera())
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
|
|
@ -231,7 +231,7 @@ void Widget::onExit()
|
|||
|
||||
void Widget::visit(Renderer *renderer, const Mat4 &parentTransform, uint32_t parentFlags)
|
||||
{
|
||||
if (_visible)
|
||||
if (_visible || !isVisitableByVisitingCamera())
|
||||
{
|
||||
adaptRenderers();
|
||||
ProtectedNode::visit(renderer, parentTransform, parentFlags);
|
||||
|
|
|
@ -579,7 +579,7 @@ void ScrollView::onAfterDraw()
|
|||
void ScrollView::visit(Renderer *renderer, const Mat4 &parentTransform, uint32_t parentFlags)
|
||||
{
|
||||
// quick return if not visible
|
||||
if (!isVisible())
|
||||
if (!isVisible() || !isVisitableByVisitingCamera())
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue