MZ Issues with Scene_Shop Command Window Y Position

What might prevent this:

Spoiler: Scene_Shop Rectangle Code
Scene_Shop.prototype.helpWindowRect = function() {
const wx = 0;
const wy = this.mainAreaTop();//this.helpAreaTop();
const ww = Graphics.boxWidth;
const wh = this.helpAreaHeight();
return new Rectangle(wx, wy, ww, wh);
};

Scene_Shop.prototype.commandWindowRect = function() {
const helpWindowRect = this.helpWindowRect();
const wx = 0;
const wy = helpWindowRect.y + helpWindowRect.height;
const ww = Graphics.boxWidth/6;//this._goldWindow.x;
const wh = this.calcWindowHeight(3, true);
return new Rectangle(wx, wy, ww, wh);
};

Scene_Shop.prototype.categoryWindowRect = function() {
const commandWindowRect = this.commandWindowRect();
const wx = 0;
const wy = commandWindowRect.y + commandWindowRect.height;
const ww = commandWindowRect.width;
const wh = this.calcWindowHeight(6, true);
return new Rectangle(wx, wy, ww, wh);
};

from translating properly here:

1726956725040.png


especially since the Categories window is adjusting as if the command window IS where it should be

1726956746682.png


Even manually setting the wy for the command window doesn't move it, x, width, and height adjust correctly though

But non matter what the commannd window ends up on top of the help window

Following up, I actually figured it out by taking another look at Scene_Shop.prototype.createCommandWindow
Spoiler: Scene_Shop.prototype.createCommandWindow
Scene_Shop.prototype.createCommandWindow = function() {
const rect = this.commandWindowRect();
this._commandWindow = new Window_ShopCommand(rect);
this._commandWindow.setPurchaseOnly(this._purchaseOnly);
this._commandWindow.y = this.mainAreaTop();
this._commandWindow.setHandler("buy", this.commandBuy.bind(this));
this._commandWindow.setHandler("sell", this.commandSell.bind(this));
this._commandWindow.setHandler("cancel", this.popScene.bind(this));
this.addWindow(this._commandWindow);
};


it forces the windows y position to = this.mainAreaTop(), so I had to go ahead and overwrite that function and remove that line.


Sorted!

1726957535794.png

This thread is being closed, due to being solved. If for some reason you would like this thread re-opened, please report this post and leave a message why. Thank you.

Original thread: https://forums.rpgmakerweb.com/threads/issues-with-scene_shop-command-window-y-position.172060/