Hi, Yesterday my friend share me the code to change menu when specific Switch was ON. This is the code: I am trying to hide some Menu Commands when switch was on by adding some commented code like this:
Hi,
Yesterday my friend share me the code to change menu when specific Switch was ON.
This is the code:
https://gist.githubusercontent.com/elleonard/6a658a4cef9c152313340e08539e16de/raw/f0ed8222088932ead6235b33821671555ce6cd1f/MenuDisplayLogicSwitch.js
I am trying to hide some Menu Commands when switch was on by adding some commented code like this:
Code:
Window_MenuCommand.prototype.addFormationCommand = function() {};
Window_MenuCommand.prototype.addMainCommands = function() {
var enabled = this.areMainCommandsEnabled();
// if (this.needsCommand('item')) {
// this.addCommand(TextManager.item, 'item', enabled);
// }
// if (this.needsCommand('skill')) {
// this.addCommand(TextManager.skill, 'skill', enabled);
// }
// if (this.needsCommand('equip')) {
// this.addCommand(TextManager.equip, 'equip', enabled);
// }
if (this.needsCommand('status')) {
this.addCommand("Units", 'status', enabled);
}
};
It works, but it doesn't follow the Switch as intended, so the change in menu are permanent instead of switchable.
How to make the code above switchable?
Thanks.