phaser3-nineslice icon indicating copy to clipboard operation
phaser3-nineslice copied to clipboard

changing texture functionality

Open as3mbus opened this issue 4 years ago • 0 comments

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 👍

as3mbus avatar Oct 13 '20 02:10 as3mbus