Skip to content

Commit

Permalink
バグ修正:x,y値が反映されない不具合修正
Browse files Browse the repository at this point in the history
  • Loading branch information
munokura committed Apr 14, 2022
1 parent 4ac8333 commit 4d2d899
Showing 1 changed file with 20 additions and 11 deletions.
31 changes: 20 additions & 11 deletions MNKR_CustomActorCommandMZ.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
* --------------------------------------------------
* MNKR_CustomActorCommandMZ.js
* Ver.0.0.1
* Ver.0.0.2
* Copyright (c) 2022 Munokura
* This software is released under the MIT license.
* http://opensource.org/licenses/mit-license.php
Expand Down Expand Up @@ -126,16 +126,8 @@
} else {
wh = this.windowAreaHeight();
}
if (PRM_commandX > 0) {
wx = PRM_commandX;
} else {
wx = this.isRightInputMode() ? Graphics.boxWidth - ww : 0;
}
if (PRM_commandY > 0) {
wy = PRM_commandY;
} else {
wy = Graphics.boxHeight - wh;
}
wx = this.isRightInputMode() ? Graphics.boxWidth - ww : 0;
wy = Graphics.boxHeight - wh;
return new Rectangle(wx, wy, ww, wh);
};

Expand Down Expand Up @@ -163,4 +155,21 @@
}
};

const _Window_ActorCommand_refresh = Window_ActorCommand.prototype.refresh;
Window_ActorCommand.prototype.refresh = function () {
_Window_ActorCommand_refresh.call(this);
// 自動調整を試みたが、下のコマンドが表示されなくなってしまう
// if (PRM_commandHeight < 0) {
// const lines = Math.ceil(this.maxItems() / PRM_commandCols);
// this.height = this.fittingHeight(lines);
// }
if (PRM_commandX > 0) {
this.x = PRM_commandX;
}
if (PRM_commandY > 0) {
this.y = PRM_commandY;
}
}


})();

0 comments on commit 4d2d899

Please sign in to comment.