Grey out command

Lady

Mapper, pixel artist
Veteran
Joined
Jul 27, 2013
Messages
45
Reaction score
47
First Language
Chinese
Primarily Uses
RMMV
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');
};
 

Shaz

Veteran
Veteran
Joined
Mar 2, 2012
Messages
38,779
Reaction score
12,207
First Language
English
Primarily Uses
RMMV
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.
 

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Latest Threads

Latest Posts

Latest Profile Posts

Working on a test Boss for the new No Travel Game Jam
- Name Plugin by Moghunter -
Free RPG Maker Ready Charging Up Animation

Enjoy -No Credit Needed But Appreciated -
Download it at https://lvgames.itch.io/free-charging-up-pixel-animation-fx-rpg-maker-ready
:/ .... so, thought I’d go to the park to sit in the cool breeze and get out of the house a little. Nope, guess that’s quarantined too. Ok...
How do you do when you want to work on projects but the game companies make so many games available for free because of the quarantine?
Kes
I have just stepped down from being a Mod, so please don't send me any more pm's with Mod questions. Thanks

Forum statistics

Threads
95,486
Messages
929,515
Members
125,729
Latest member
atsuya_sr
Top