MZ Modify or hide box behind selectable items

I've been trying to modify the faded box that shows behind all selectable items, but I can't figure out where it's made or called. I don't really want it to be a faded box like it is by default.
NCzWN4f.png


There was a script I found for RMMV that was meant to change text color if it's selected, and it's pretty broken so it just deletes the box, but I was trying to see if I could just modify the box. The script isn't mine.

Spoiler: RMMV script
Window_Command.prototype.drawItemColored = function(index) { var rect = this.itemRectForText(index); var align = this.itemTextAlign(); if(this.currentData()) { this.changeTextColor(this.textColor(Gamefall.selectionColor)); this.changePaintOpacity(this.isCommandEnabled(index)); this.drawText(this.commandName(index), rect.x, rect.y, rect.width, align); } }; Window_Command.prototype.update = function() { Window_Selectable.prototype.update.call(this); this.drawAllItems(); this.drawItemColored(this.index()); }; Window_Command.prototype.drawAllItems = function() { var topIndex = this.topIndex(); for (var i = 0; i < this.maxPageItems(); i++) { var index = topIndex + i; if (index < this.maxItems()) { this.drawItem(index); } } };
I modified the changeTextColor and var rect to be the right values, so I know that was broken at first. But I found that this script also breaks and deletes the boxes behind text, but I don't know how it does that.
Have you tried to modify Window.png located in "img/system"?
Have you tried to modify Window.png located in "img/system"?
It's a custom window skin I made and I want to keep it. Nothing in there would show some black box behind the commands so it's not the windowskin.
Got it, it was from drawBackgroundRect
JavaScript:
Window_Selectable.prototype.drawBackgroundRect = function(rect) {
    const c1 = ColorManager.itemBackColor1();
    const c2 = ColorManager.itemBackColor2();
    const x = rect.x;
    const y = rect.y;
    const w = rect.width;
    const h = rect.height;
    this.contentsBack.gradientFillRect(x, y, w, h, c1, c2, true);
    this.contentsBack.strokeRect(x, y, w, h, c1);
};
Got it, it was from drawBackgroundRect
JavaScript:
Window_Selectable.prototype.drawBackgroundRect = function(rect) {
    const c1 = ColorManager.itemBackColor1();
    const c2 = ColorManager.itemBackColor2();
    const x = rect.x;
    const y = rect.y;
    const w = rect.width;
    const h = rect.height;
    this.contentsBack.gradientFillRect(x, y, w, h, c1, c2, true);
    this.contentsBack.strokeRect(x, y, w, h, c1);
};
Oh my gosh thank YOU
I hope it's OK that I'm jumping into this thread, but I have the same question. I am using Visustella's core engine plugin and I found that script in the parameters under "Window Settings." I am still learning when it comes to coding, but how do I adjust the code to (for example) turn all the buttons green? I tried specifying c1 and c2 but I must have done it wrong.

Any help will be super appreciated, thank you! 🙂

const rect = arguments[0];
const c1 = ColorManager.itemBackColor1();
const c2 = ColorManager.itemBackColor2();
const x = rect.x;
const y = rect.y;
const w = rect.width;
const h = rect.height;
this.contentsBack.gradientFillRect(x, y, w, h, c1, c2, true);
this.contentsBack.strokeRect(x, y, w, h, c1);

Original thread: https://forums.rpgmakerweb.com/threads/modify-or-hide-box-behind-selectable-items.133345/