ACECORP

Close option to click inside the option menu

5 posts in this topic

When you open the menu shown in the screen shot below, in a town, dungeon, or on the overworld map, it would be nice to have a choice at the bottom below the "Game End" choice that says "close menu" that will simply close the open menu screen so you can return to playing the game. Does anyone have a plugin for RPGMaker MV that does this? Or if nobody does, can someone describe how and what I could do to make such a plugin?

image.jpeg

Edited by ACECORP

Share this post


Link to post
Share on other sites

Is there a reason why just cancelling out is no good?

Share this post


Link to post
Share on other sites

Yea... I have a d-pad with an a and b game buttons in there and it's not intuitive to the players to not use the d-pad and buttons. So I wanted to add a "close menu" option there so they can just slide the d-pad down to select "close menu" and then press the a button like they do with all the built in menu choices.

Edited by ACECORP

Share this post


Link to post
Share on other sites

This can be done using the menu command manager.

 

Here is the code that will create a "Close" command for your menu

 

var TH_SceneMenu_closeMenu_createCommandWindow = Scene_Menu.prototype.createCommandWindow;
Scene_Menu.prototype.createCommandWindow = function() {
  TH_SceneMenu_closeMenu_createCommandWindow.call(this);
  this._commandWindow.setHandler('closeMenu', this.commandCloseMenu.bind(this));
};

Game_Unit.prototype.addMenuCommand_closeMenu = function() {
  var command = new Data_MenuCommand("closeMenu", "Close");
  this.addMenuCommand(command);
};

Window_MenuCommand.prototype.addCommand_closeMenu = function(cmd) {
  this.addCommand(cmd.name, cmd.symbol, cmd.isEnabled(), cmd.ext);
};

Scene_Menu.prototype.commandCloseMenu = function() {
  SceneManager.pop();
};

You can either create a new plugin file, or add this to the end of menu command manager.

 

Then, to add the command to the party, you would use the script call

$gameParty.addMenuCommand_closeMenu()

Which will add the command to the end of the party menu.

 

This is how it will look

 

 

If you want to change the name of the command, look at the code and look for "Close".

You can also rename menu commands using script calls provided by the menu command manager.

 

 

Edited by Tsukihime
jchedges likes this

Share this post


Link to post
Share on other sites

Thanks so much! This solves my issue! I will implement your suggestion! Thanks again!

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now

  • Recently Browsing   0 members

    No registered users viewing this page.