Oh, I get it.
This command:
MyScene.addWindow(this.confirmationWindow)
Is to add the window to the scene/window layers of the scene. Not to open the window.
So I think when you are using it, the window shows no animation because by default the window is already open when you add it.
Maybe you can try something like that, when the scene is starting/initiating:
JavaScript:
MyScene.addWindow(this.confirmationWindow)
this.confirmationWindow.close()
this.confirmationWindow.hide()
this.confirmationWindow.deactivate()
I don't know the correct order or command, but it should be some of these 3 above.
Then, when you need the confirmation window, you can only open and activate it.
this.confirmationWindow.open()
this.confirmationWindow.activate()
Something like the Scene_Equip do with the itemWindow:
JavaScript:
Scene_Equip.prototype.createItemWindow = function() {
const rect = this.itemWindowRect();
this._itemWindow = new Window_EquipItem(rect);
this._itemWindow.setHelpWindow(this._helpWindow);
this._itemWindow.setStatusWindow(this._statusWindow);
this._itemWindow.setHandler("ok", this.onItemOk.bind(this));
this._itemWindow.setHandler("cancel", this.onItemCancel.bind(this));
this._itemWindow.hide(); // Here! It hides the window, then add it later.
this._slotWindow.setItemWindow(this._itemWindow);
this.addWindow(this._itemWindow); // Add the window already hided.
};
Scene_Equip.prototype.onSlotOk = function() {
this._slotWindow.hide();
this._itemWindow.show(); // Now he shows it!
this._itemWindow.activate();
this._itemWindow.select(0);
};
NOTE: I don't know if hiding a window just turns off the visibility or it closes too. And if the show command just does the reverse. Maybe you need to hide and close. Don't know for sure ^^''