Grey out command

I'm trying to make a small pop up window with use and discard command. What should I write to grey out "use" for unusable item.


Window_ItemCommand.prototype.makeCommandList = function() {
this.addCommand(use, 'use');
this.addCommand(discard, 'discard');
};
What makes it usable/unusable?

You just need to add a true/false as the third argument.

If it's a normal item and you're determining usable/unusable in the same way that the default Window_ItemList does, then you can use $gameParty.canUse(item) as the third argument.

Original thread: https://forums.rpgmakerweb.com/threads/grey-out-command.118569/