Close option to click inside the option menu

ACECORP

Founder & Entrepreneur
Veteran
Joined
Apr 6, 2016
Messages
253
Reaction score
40
First Language
English
Primarily Uses
RMMV
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
 
Last edited by a moderator:

Maliki79

Veteran
Veteran
Joined
Mar 13, 2012
Messages
811
Reaction score
353
First Language
English
Primarily Uses
N/A
Is there a reason why just cancelling out is no good?
 

ACECORP

Founder & Entrepreneur
Veteran
Joined
Apr 6, 2016
Messages
253
Reaction score
40
First Language
English
Primarily Uses
RMMV
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.
 
Last edited by a moderator:

Tsukihime

Veteran
Veteran
Joined
Jun 30, 2012
Messages
8,564
Reaction score
3,851
First Language
English
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.
 
Last edited by a moderator:

ACECORP

Founder & Entrepreneur
Veteran
Joined
Apr 6, 2016
Messages
253
Reaction score
40
First Language
English
Primarily Uses
RMMV
Thanks so much! This solves my issue! I will implement your suggestion! Thanks again!
 

Latest Threads

Latest Posts

Latest Profile Posts

I haven't make anything new yet, but I'm back addicted to writing some MZ plugins. Man, I wish I have more free time like I did 5 years ago.
Holy cow... work is demanding and I'm back in college. I'm kind of scared of my dad right now after the incident, but at least I don't live with him all the time. Anyway, working on Fandom Scouts and my FNAF character set. The FNAF sprites are actually going to be used in the game... unfortunately the enemy sprites are FNAF World traces, so no sharing those.
The honeymoon period is over with Cyberpunk 2077, It sadly doesnt live up to the hype, pretty graphics arent everything (especially when I cant even do something as simple as changing the radio station over!). Replaying Breath of the wild has reminded me what a good game really looks like, plus that one has good glitches!....

Forum statistics

Threads
107,687
Messages
1,031,442
Members
139,804
Latest member
PeJoTa
Top