Fix #38 alignment issue in drawBattler method

main
xian18 1 year ago
parent 70263a04b5
commit 890302a22a
Signed by: SaltedFish
GPG Key ID: B0C26448E9EF40CA

File diff suppressed because one or more lines are too long

@ -4732,7 +4732,7 @@ Window_Help.prototype.specialSelectionText = function (action) {
Window_Help.prototype.drawBattler = function (battler) { Window_Help.prototype.drawBattler = function (battler) {
var text = battler.name(); var text = battler.name();
var wx = 0; var wx = (this.contents.width - this.textWidthEx(text)) / 2;
var wy = (this.contents.height - this.lineHeight()) / 2; var wy = (this.contents.height - this.lineHeight()) / 2;
this.drawTextEx(text, wx, wy); this.drawTextEx(text, wx, wy);
}; };
@ -5210,7 +5210,7 @@ Window_EnemyVisualSelect.prototype.refresh = function () {
this.contents.fontSize = Yanfly.Param.BECEnemyFontSize; this.contents.fontSize = Yanfly.Param.BECEnemyFontSize;
var text = this._battler.name(); var text = this._battler.name();
var wy = this.contents.height - this.lineHeight(); var wy = this.contents.height - this.lineHeight();
this.drawTextEx(text, 0, wy); this.drawText(text, 0, wy, this.contents.width, "center");
}; };
//============================================================================= //=============================================================================

@ -2132,7 +2132,7 @@ if (Imported.YEP_BattleEngineCore) {
Window_Help.prototype.drawBattlerWithIcons = function (battler) { Window_Help.prototype.drawBattlerWithIcons = function (battler) {
var icons = battler.allIcons(); var icons = battler.allIcons();
var text = battler.name(); var text = battler.name();
var wx = 0; var wx = (this.contents.width - this.textWidthEx(text)) / 2;
var wy = 0; var wy = 0;
this.drawTextEx(text, wx, wy); this.drawTextEx(text, wx, wy);
wy += this.lineHeight(); wy += this.lineHeight();

Loading…
Cancel
Save