Open shibekin69 opened 7 years ago
Ok, I was fiddling around with your nineslice sprite object. After resizing, I can do this:
nineslicegraphic.texture.requiresReTint = true;
That will fix up the graphic after the resize.
I modified the phaser-nineslice.js source.
Adding the ff:
this.texture.requiresReTint = true;
After this for loop:
for (var yi = 0; yi < 3; yi++) {
for (var xi = 0; xi < 3; xi++) {
var s = this.createTexturePart(textureXs[xi], textureYs[yi], textureXs[xi + 1] - textureXs[xi], textureYs[yi + 1] - textureYs[yi]);
s.width = finalXs[xi + 1] - finalXs[xi];
s.height = finalYs[yi + 1] - finalYs[yi];
this.texture.renderXY(s, finalXs[xi], finalYs[yi]);
}
}
Hi,
When I try using tint, it works along with the resize function, but the nineslice graphic gets messed up. The edges (in my case, the right and the bottom) disappears. I'm on Phaser 2.8.1, canvas mode btw.