I am running a plugin that lets me display sprites on the various menu screens, but I am having trouble with duplicate images stacking on top of each other when I change the party formation around. The 2 sprites who are swapped will overlay one onto the other like so.
The same issue was occurring with the shop scene, but I was able to fix this by adding the following lines to the top of Window_ShopStatus.prototype.refresh = function():
this.contents.clear();
if (this._actorSprite) {
this._actorSprite.destroy();
delete this._actorSprite;
}
So I was wondering, is there an equivalent for this function that applies to the main menu/formation screen? I was not able to find anything that worked similarly in rpg_windows.js. I even tried pasting the code under every refresh function, as well as those that contain this.contents.clear(); , but alas no luck.
The duplicated sprites do disappear when I access another part of the menu such as Skills or Status, or when I close the menu and reopen it. This gives me some ideas but I am not entirely sure how to approach this either.
Any pointers?
The same issue was occurring with the shop scene, but I was able to fix this by adding the following lines to the top of Window_ShopStatus.prototype.refresh = function():
this.contents.clear();
if (this._actorSprite) {
this._actorSprite.destroy();
delete this._actorSprite;
}
So I was wondering, is there an equivalent for this function that applies to the main menu/formation screen? I was not able to find anything that worked similarly in rpg_windows.js. I even tried pasting the code under every refresh function, as well as those that contain this.contents.clear(); , but alas no luck.
The duplicated sprites do disappear when I access another part of the menu such as Skills or Status, or when I close the menu and reopen it. This gives me some ideas but I am not entirely sure how to approach this either.
Any pointers?