I'm trying to create a custom menu using two windows, but only the first window is showing. The code I'm using is this:
If I use this code below, both windows appear, but I need them to be called in different functions.
So I imagine that the problem is not the initialize of the window, so I have no idea what it could be.
JavaScript:
Scene_VictoryBattle.prototype.createVictoryBattle = function() {
this._victorybattle = new Window_VictoryBattle();
this.addWindow(this._victorybattle);
this._victorybattle.open();
};
Scene_VictoryBattle.prototype.createVictoryExp = function() {
this._victorybattle.refresh(text_victorybattle_menu);
this._victoryexp = new Window_VictoryExp();
this.addWindow(this._victoryexp);
this._victoryexp.open();
};
If I use this code below, both windows appear, but I need them to be called in different functions.
JavaScript:
Scene_VictoryBattle.prototype.create = function() {
Scene_MenuBase.prototype.create.call(this);
this._victorybattle = new Window_VictoryBattle();
this.addWindow(this._victorybattle);
this._victorybattle.open();
this._victoryexp = new Window_VictoryExp();
this.addWindow(this._victoryexp);
this._victoryexp.open();
}
So I imagine that the problem is not the initialize of the window, so I have no idea what it could be.