hi! I've been trying to understand this problem that I'm having concerning the correct way to manually remove a window.
I've tried ".close" but this doesn't work and its very similar to ".hide" .
an example;
but those don't work as I've noticed that global variables created by the window(intentional)get multiplied if I create the window afterwards.
any advice would be greatly appreciated, thanks in advance~
I've tried ".close" but this doesn't work and its very similar to ".hide" .
an example;
JavaScript:
Scene_GameEnd.prototype.createCommandWindow = function() {
const rect = this.commandWindowRect();
this._commandWindow = new Window_GameEnd(rect);
this._commandWindow.setHandler("toTitle", this.commandToTitle.bind(this));
this._commandWindow.setHandler("cancel", this.popScene.bind(this));
this.addWindow(this._commandWindow);
};
//ive tried
this._commandWindow.close();
//and
this._commandWindow.hide();
but those don't work as I've noticed that global variables created by the window(intentional)get multiplied if I create the window afterwards.
any advice would be greatly appreciated, thanks in advance~