Skip to content
This repository has been archived by the owner on May 2, 2022. It is now read-only.

Commit

Permalink
fixed bug: #9
Browse files Browse the repository at this point in the history
  • Loading branch information
jcyuan committed Nov 18, 2017
1 parent fc4da45 commit a2e75eb
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/GLoader.ts
Original file line number Diff line number Diff line change
Expand Up @@ -266,7 +266,7 @@ namespace fgui {
/**overwrite this for load resources by your own way */
protected loadExternal(): void {
new PIXI.loaders.Loader()
.add("__externalLoaderRes", this.$url, { loadType: PIXI.loaders.Resource.LOAD_TYPE.IMAGE }) //supposed to load an image
.add("__externalLoaderRes_" + this.id, this.$url, { loadType: PIXI.loaders.Resource.LOAD_TYPE.IMAGE }) //supposed to load an image
.load((ld: PIXI.loaders.Loader, res: PIXI.loaders.ResourceDictionary) => {
this.$loadResCompleted(ld, res);
});
Expand All @@ -278,7 +278,7 @@ namespace fgui {
}

private $loadResCompleted(ld: PIXI.loaders.Loader, res: PIXI.loaders.ResourceDictionary): void {
let resTex: PIXI.loaders.Resource = res.__externalLoaderRes;
let resTex: PIXI.loaders.Resource = res["__externalLoaderRes_" + this.id];
if (resTex.texture)
this.onExternalLoadSuccess(resTex.texture);
else
Expand Down

0 comments on commit a2e75eb

Please sign in to comment.