Thanks for showing me that item menu code.
Since I am using YEP_MainMenuManager.js and the Yanfly plugin suite, I think I need to look inside their code and see how they implement the ItemCategory.menu and then try and change it so that it achieves what your code below does with the cancel option.
Opening up the YEP_MainMenuManager.js file, it doesn't contain anything obvious pertaining to an Item submenu, so I have a feeling that maybe the Item submenu code is actually located elsewhere in a different yanfly plugin like inside the YEP_CoreEngine.js or one of the other foundation level yanfly plugins.
I was hoping to find someone who uses the Yanfly plugin suite and already did this.
If I implement my own code, like you did, it could conflict with something yanfly plugins already do and cause errors. I encountered that when I tried to do a different plugin for a directional pad. I had to figure out how to do it in yanfly so there wouldn't be any conflicts.
You at least pointed me in the direction I need to go, so I thank you for that.
🙂
Window_ItemCategory.prototype.maxCols = function() {
return 5;
};
Window_ItemCategory.prototype.makeCommandList = function() {
this.addCommand(TextManager.item, 'item');
this.addCommand(TextManager.weapon, 'weapon');
this.addCommand(TextManager.armor, 'armor');
this.addCommand(TextManager.keyItem, 'keyItem');
this.addCommand('Close Menu', 'cancel');
};