Closed Shadowstep33 closed 8 years ago
No sorry, there is no such feature, since EZGUI is based on PIXI, and I don't think that Pixi provide such feature. if so, I can add it to EZGUI.
PIXI's Sprites have a .fromImage function that will load in any url as a texture
more specifically too, you could verify if something is in the cache first with
PIXI.utils.TextureCache[texture_name]
if(typeof PIXI.utils.TextureCache[cfg.default] == "undefined"){
var img = new PIXI.Sprite( new PIXI.Texture.fromImage(cfg.default) );
}else{
var img = new PIXI.Sprite(cfg.texture);
}
The above around line 2220 in the built EZGUI.js seems to resolve this problem
Is there a way to dynamically load images for button textures? The image property seems to be only trying to pull from PIXI's texture cache