mirror of https://github.com/axmolengine/axmol.git
Merge pull request #7332 from 2youyouo2/v3
fixed set color to parent, it will effect its children
This commit is contained in:
commit
b583684d61
|
@ -303,12 +303,10 @@ void NodeReader::initNode(Node* node, const rapidjson::Value& json)
|
||||||
if(alpha != 255)
|
if(alpha != 255)
|
||||||
{
|
{
|
||||||
node->setOpacity(alpha);
|
node->setOpacity(alpha);
|
||||||
node->setCascadeOpacityEnabled(true);
|
|
||||||
}
|
}
|
||||||
if(red != 255 || green != 255 || blue != 255)
|
if(red != 255 || green != 255 || blue != 255)
|
||||||
{
|
{
|
||||||
node->setColor(Color3B(red, green, blue));
|
node->setColor(Color3B(red, green, blue));
|
||||||
node->setCascadeColorEnabled(true);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue