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