mirror of https://github.com/axmolengine/axmol.git
Let Widget class don't support cascaded opacity and cascaded color on default.
This commit is contained in:
parent
9f51adfafa
commit
ab33e6f9a2
|
@ -381,9 +381,9 @@ void ProtectedNode::updateDisplayedOpacity(GLubyte parentOpacity)
|
||||||
for(auto child : _children){
|
for(auto child : _children){
|
||||||
child->updateDisplayedOpacity(_displayedOpacity);
|
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){
|
for(const auto &child : _children){
|
||||||
child->updateDisplayedColor(_displayedColor);
|
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);
|
child->updateDisplayedColor(Color3B::WHITE);
|
||||||
}
|
}
|
||||||
for(auto child : _protectedChildren){
|
for(auto child : _protectedChildren){
|
||||||
child->updateDisplayedColor(Color3B::WHITE);
|
child->setColor(Color3B::WHITE);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -208,9 +208,6 @@ bool Widget::init()
|
||||||
this->setAnchorPoint(Vec2(0.5f, 0.5f));
|
this->setAnchorPoint(Vec2(0.5f, 0.5f));
|
||||||
|
|
||||||
ignoreContentAdaptWithSize(true);
|
ignoreContentAdaptWithSize(true);
|
||||||
|
|
||||||
this->setCascadeColorEnabled(true);
|
|
||||||
this->setCascadeOpacityEnabled(true);
|
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue