問題点:
このウインドウはX軸が固定されているので、それを動く様にしたいがそれが出来ていない。
やってみた事:
コアスプリクトを弄ってみた。
コード: 全て選択
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);
};
Scene_Shop.prototype.commandWindowRect = function() {
const wx = 0;
const wy = this.mainAreaTop();
const ww = this._goldWindow.x;
const wh = this.calcWindowHeight(1, true);
return new Rectangle(wx, wy, ww, wh);
};
コード: 全て選択
Scene_Shop.prototype.createCommandWindow = function() {
const rect = this.commandWindowRect();
this._commandWindow = new Window_ShopCommand(rect);
this._commandWindow.setPurchaseOnly(this._purchaseOnly);
this._commandWindow.y = 0;
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);
};
Scene_Shop.prototype.commandWindowRect = function() {
const wx = 0;
const wy = 0;
const ww = this._goldWindow.x;
const wh = this.calcWindowHeight(1, true);
return new Rectangle(wx, wy, ww, wh);
};
それを踏まえて下記のプラグインを書きました。
コード: 全て選択
Scene_Shop.prototype.createCommandWindow = function() {
const rect = this.commandWindowRect();
this._commandWindow = new Window_ShopCommand(rect);
this._commandWindow.setPurchaseOnly(this._purchaseOnly);
this._commandWindow.y = parameters['Kategoriitiy'];
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);
};
Scene_Shop.prototype.commandWindowRect = function() {
const wx = parameters['Kategoriitix'];
const wy = 0;
const ww = parameters['Kategoriyoko'];
const wh = parameters['Kategoritate'];
return new Rectangle(wx, wy, ww, wh);
};
何が問題なのか私には分かりませんので、どなたかウインドウのY軸の動かし方を御教え頂けませんか。