fyfuture 发表于 2026-3-13 21:37:23

关于MZ的标题画面

问一个关于MZ标题界面的问题,有什么办法可以实现把标题画面里面“设置”选项“改成”离开游戏“呢?或者有没有什么插件能实现,谢谢大佬

三姐 发表于 2026-3-15 08:31:40


这样吧?
点击离开游戏,会直接关闭游戏窗口
在项目 js/plugins 文件夹里,新建一个文本文件,命名为 Title_ChangeOptionToExit.js



/*:
* @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();
    });
};
})();


或者直接下载我弄好的(记得在插件管理器里启用)


fyfuture 发表于 2026-3-15 11:43:16

感谢版主大人,不胜感激{:7_296:}

一只大团团 发表于 2026-3-19 08:12:32

{:5_380:}
感谢分享,很实用
页: [1]
查看完整版本: 关于MZ的标题画面