MZ Is there a Selection Window Anti-Stretch?

I'm trying to have the selection window (yellow) be this:

Window.png


but it comes out as this:

Screenshot 2025-05-11 162012.png


Is there a plugin that can fix this?
Could this work for you? I've used it before for overworld anti-stretch, but never for battles. I imagine it's the same thing, though.
This thread was moved from RPG Maker MZ Support to JS Plugin Requests.
Could this work for you? I've used it before for overworld anti-stretch, but never for battles. I imagine it's the same thing, though.

That was my first thought, but it didn't work. I think it's because that applies to windows and not selection screens.
I think the area uses 4x4 grids for its corners. So even if the plugin works, the rest of the parts still looks off.

1747017290110.png


The part is called cursor area, in the source code:

JavaScript:
Window.prototype._refreshCursor = function() {
    const drect = this._cursorRect.clone();
    const srect = { x: 96, y: 96, width: 48, height: 48 };
    const m = 4;
    for (const child of this._cursorSprite.children) {
        child.bitmap = this._windowskin;
    }
    this._setRectPartsGeometry(this._cursorSprite, srect, drect, m);
};

What you need to do is create a plugin with the code that chages m to a bigger value.

JavaScript:
Window.prototype._refreshCursor = function() {
    const drect = this._cursorRect.clone();
    const srect = { x: 96, y: 96, width: 48, height: 48 };
    const m = 20;
    for (const child of this._cursorSprite.children) {
        child.bitmap = this._windowskin;
    }
    this._setRectPartsGeometry(this._cursorSprite, srect, drect, m);
};
I think the area uses 4x4 grids for its corners. So even if the plugin works, the rest of the parts still looks off.

View attachment 340149

The part is called cursor area, in the source code:

JavaScript:
Window.prototype._refreshCursor = function() {
    const drect = this._cursorRect.clone();
    const srect = { x: 96, y: 96, width: 48, height: 48 };
    const m = 4;
    for (const child of this._cursorSprite.children) {
        child.bitmap = this._windowskin;
    }
    this._setRectPartsGeometry(this._cursorSprite, srect, drect, m);
};

What you need to do is create a plugin with the code that chages m to a bigger value.

JavaScript:
Window.prototype._refreshCursor = function() {
    const drect = this._cursorRect.clone();
    const srect = { x: 96, y: 96, width: 48, height: 48 };
    const m = 20;
    for (const child of this._cursorSprite.children) {
        child.bitmap = this._windowskin;
    }
    this._setRectPartsGeometry(this._cursorSprite, srect, drect, m);
};
Thank you so much! It worked! ;D

Original thread: https://forums.rpgmakerweb.com/threads/is-there-a-selection-window-anti-stretch.177598/