Let Widget class don't support cascaded opacity and cascaded color on default.

This commit is contained in:
andyque 2014-08-06 16:21:00 +08:00
parent 9f51adfafa
commit ab33e6f9a2
2 changed files with 7 additions and 10 deletions

View File

@ -381,9 +381,9 @@ void ProtectedNode::updateDisplayedOpacity(GLubyte parentOpacity)
for(auto child : _children){
child->updateDisplayedOpacity(_displayedOpacity);
}
for(auto child : _protectedChildren){
child->updateDisplayedOpacity(_displayedOpacity);
}
}
for(auto child : _protectedChildren){
child->setOpacity(_realOpacity);
}
}
@ -399,9 +399,9 @@ void ProtectedNode::updateDisplayedColor(const Color3B& parentColor)
for(const auto &child : _children){
child->updateDisplayedColor(_displayedColor);
}
for(const auto &child : _protectedChildren){
child->updateDisplayedColor(_displayedColor);
}
}
for(const auto &child : _protectedChildren){
child->setColor(_realColor);
}
}
@ -411,7 +411,7 @@ void ProtectedNode::disableCascadeColor()
child->updateDisplayedColor(Color3B::WHITE);
}
for(auto child : _protectedChildren){
child->updateDisplayedColor(Color3B::WHITE);
child->setColor(Color3B::WHITE);
}
}

View File

@ -208,9 +208,6 @@ bool Widget::init()
this->setAnchorPoint(Vec2(0.5f, 0.5f));
ignoreContentAdaptWithSize(true);
this->setCascadeColorEnabled(true);
this->setCascadeOpacityEnabled(true);
return true;
}