[JavaScript] 纯文本查看 复制代码 /*:
* @target MZ
* @plugindesc 标题画面将「设置」改为「离开游戏」
* @author RPG民族
* @help 直接启用即可,无需设置参数。
*/
(() => {
const _Window_TitleCommand_makeCommandList = Window_TitleCommand.prototype.makeCommandList;
Window_TitleCommand.prototype.makeCommandList = function() {
_Window_TitleCommand_makeCommandList.call(this);
this.clearCommandList();
this.addCommand(TextManager.newGame, 'newGame');
this.addCommand(TextManager.continue_, 'continue', this.isContinueEnabled());
this.addCommand('离开游戏', 'exit');
};
// 点击「离开游戏」直接关闭游戏
const _Scene_Title_createCommandWindow = Scene_Title.prototype.createCommandWindow;
Scene_Title.prototype.createCommandWindow = function() {
_Scene_Title_createCommandWindow.call(this);
this._commandWindow.setHandler('exit', () => {
SceneManager.exit();
});
};
})();
|