9. 之后把上方VS Code搜到的內容先复制下来变成
// 省略......
(() => {
Window_TitleCommand.prototype.makeCommandList = function () {
const continueEnabled = this.isContinueEnabled();
this.addCommand(TextManager.newGame, "newGame");
this.addCommand(TextManager.continue_, "continue", continueEnabled);
this.addCommand(TextManager.options, "options");
};
Scene_Title.prototype.createCommandWindow = function () {
const background = $dataSystem.titleCommandWindow.background;
const rect = this.commandWindowRect();
this._commandWindow = new Window_TitleCommand(rect);
this._commandWindow.setBackgroundType(background);
this._commandWindow.setHandler("newGame", this.commandNewGame.bind(this));
this._commandWindow.setHandler("continue", this.commandContinue.bind(this));
this._commandWindow.setHandler("options", this.commandOptions.bind(this));
this.addWindow(this._commandWindow);
};
Scene_Title.prototype.commandOptions = function () {
this._commandWindow.close();
SceneManager.push(Scene_Options);
};
})();
收起