Code:
Scene_Title.prototype.createCommandWindow = function() {
this._commandWindow = new Window_TitleCommand();
this._commandWindow.setHandler('newGame', this.commandNewGame.bind(this));
this._commandWindow.setHandler('continue', this.commandContinue.bind(this));
this._commandWindow.setHandler('gameEnd',()=>{
this._commandWindow.close();
this.fadeOutAll();
SceneManager.exit();
});
this.addWindow(this._commandWindow);
};
Window_TitleCommand.prototype.makeCommandList = function() {
this.addCommand(TextManager.newGame, 'newGame');
this.addCommand(TextManager.continue_,'continue', this.isContinueEnabled());
this.addCommand(TextManager.gameEnd, 'gameEnd');
};
This should do what you want I think.
If you want to change the end game button to say something other than "Game End," then you can either change the term in the database, or change the third line of the second function like shown below:
Code:
this.addCommand("Exit Game", 'gameEnd');
In the createCommandWindow function we define the behavior for each of the commands, and in makeCommandList we define the order and names of the commands.