phaser3-nineslice
phaser3-nineslice copied to clipboard
changing texture functionality
is there any way to change texture ?
the case i need this feature, is when i need to change the image texture from non-highlighted to highlighted state.
for the time being i'm using the following lines to change the texture :
this.nineSlice.sourceTex = this.scene.sys.textures.get(toggle ? Asset.survey_box_highlight.key : Asset.survey_box.key);
this.nineSlice.initFrames();
this.nineSlice.drawFrames();
but i believe these functionality could be much better if provided within the plugin. and i'm still not sure if these lines is proper way to change it as well.
thank you for the plugin it helps a lot 👍