MZ Tiling window skin plugins?

1739288527227.png
1739288590029.png
1739288604069.png

I think the screenshots explain it well.
By default the 4 edge sprites are stretched.
But I think some window skins may look better if they use tiling sprites instead.

So I made aquick edit of the window skin code. But I guess there are other plugins that provide similar features already.
Does anyone know?

Spoiler
JavaScript:
Window.prototype._createFrameSprite = function() {
  this._frameSprite = new Sprite();
  for (let i = 0; i < 4; i++) {
      this._frameSprite.addChild(new Sprite());
  }
  for (let i = 4; i < 8; i++) {
      this._frameSprite.addChild(new TilingSprite());
  }
  this._container.addChild(this._frameSprite);
};
Window.prototype._createCursorSprite = function() {
  this._cursorSprite = new Sprite();
  for (let i = 0; i < 4; i++) {
      this._cursorSprite.addChild(new Sprite());
  }
  for (let i = 4; i < 9; i++) {
      this._cursorSprite.addChild(new TilingSprite());
  }
  this._clientArea.addChild(this._cursorSprite);
};

Window.prototype._setRectPartsGeometry = function(sprite, srect, drect, m) {
  const sx = srect.x;
  const sy = srect.y;
  const sw = srect.width;
  const sh = srect.height;
  const dx = drect.x;
  const dy = drect.y;
  const dw = drect.width;
  const dh = drect.height;
  const smw = sw - m * 2;
  const smh = sh - m * 2;
  const dmw = dw - m * 2;
  const dmh = dh - m * 2;
  const children = sprite.children;
  sprite.setFrame(0, 0, dw, dh);
  sprite.move(dx, dy);
  // corner
  children[0].setFrame(sx, sy, m, m);
  children[1].setFrame(sx + sw - m, sy, m, m);
  children[2].setFrame(sx, sy + sw - m, m, m);
  children[3].setFrame(sx + sw - m, sy + sw - m, m, m);
  children[0].move(0, 0);
  children[1].move(dw - m, 0);
  children[2].move(0, dh - m);
  children[3].move(dw - m, dh - m);
  // edge
  children[4].move(m, 0, dmw, m);
  children[5].move(m, dh - m, dmw, m);
  children[6].move(0, m, m, dmh);
  children[7].move(dw - m, m, m, dmh);
  children[4].setFrame(sx + m, sy, smw, m);
  children[5].setFrame(sx + m, sy + sw - m, smw, m);
  children[6].setFrame(sx, sy + m, m, smh);
  children[7].setFrame(sx + sw - m, sy + m, m, smh);
  // center
  if (children[8]) {
      children[8].setFrame(sx + m, sy + m, smw, smh);
      children[8].move(m, m, dmw, dmh);
  }
  for (const child of children) {
      child.visible = dw > 0 && dh > 0;
  }
};
Like this one?

Yes exactly.
Sometimes it is hard to find the correct search key word.:hswt:
Would it be possible to do the same thing for the main bulk of the windowskin (the big square that takes the upper-left corner) because it has some weird blurry stretching by default and I can't seem to find a fix for it anywhere
I'd also love for it to work for the cursor section of the windowskin because I don't like how stretched it looks by default

Original thread: https://forums.rpgmakerweb.com/threads/tiling-window-skin-plugins.175367/