I modified the title screen and added an "About" button. This button is expected to open an external link on click. Now my problem is: when this button is clicked, the game gets freezed! Closing that external window won't bring the game to normal.
I tried to call the window.open() directly in F12 console, and the game ran well. It just not work in this plugin scenario. Could someone tell me where's wrong? :oops:
Part of my plugin javascript code:
Debugger. Seems that the CPU runs into some trouble after opening the external window?
I tried to call the window.open() directly in F12 console, and the game ran well. It just not work in this plugin scenario. Could someone tell me where's wrong? :oops:
Part of my plugin javascript code:
Window_TitleCommand.prototype.makeCommandList = function () { this.addCommand(TextManager.newGame, "newGame"); this.addCommand(TextManager.options, "options"); this.addCommand("About [(an emoji here)]", "aboutGame"); }; const _Scene_Title_createCommandWindow = Scene_Title.prototype.createCommandWindow; Scene_Title.prototype.createCommandWindow = function () { _Scene_Title_createCommandWindow.call(this); this._commandWindow.setHandler("aboutGame", this.commandAboutGame.bind(this)); }; Scene_Title.prototype.commandAboutGame = function () { window.open("https://example.com", "_blank"); };Debugger. Seems that the CPU runs into some trouble after opening the external window?
[ATTACH type="full"]311873[/ATTACH]