Colorizing Scale9Slice with children

When colorizing a white 9Slice sprite with a color, it has cascadecolor set to enabled by default which will colorize all of its children nodes. When I turn it off, the 9slice won’t be colored.

What can I do to only colorize the 9SliceSprite and not the children nodes?

To solve this, what I did was have a container node that would hold the Scale9Slice which would have the same content size as the container, and added all the children of the Scale9Slice to the container instead of the 9Slice.

Hi @killerham

What engine version that you using?
When closed the cascade Children is not colorize.

var blocks = new cc.Scale9Sprite('blocks9.png');
blocks.x = x;
blocks.y = y;
this.addChild(blocks);
var t = new cc.Sprite('res/CloseNormal.png');
t.setZOrder(99);
blocks.addChild(t);
blocks.setCascadeColorEnabled(false);
blocks.setColor(cc.color.RED);

I have 3.0 RC2. I guess I was doing something wrong then. But the new method I’m using turned out to be better for my situation.

Thanks.