[Bug] Fix line spacing in level up stats and move info in Japanese (#4095)
This commit is contained in:
parent
89b33466a9
commit
80e347840d
|
@ -97,6 +97,7 @@ export default class BattleMessageUiHandler extends MessageUiHandler {
|
|||
this.levelUpStatsContainer = levelUpStatsContainer;
|
||||
|
||||
const levelUpStatsLabelsContent = addTextObject(this.scene, (this.scene.game.canvas.width / 6) - 73, -94, "", TextStyle.WINDOW, { maxLines: 6 });
|
||||
levelUpStatsLabelsContent.setLineSpacing(i18next.resolvedLanguage === "ja" ? 25 : 5);
|
||||
let levelUpStatsLabelText = "";
|
||||
|
||||
for (const s of PERMANENT_STATS) {
|
||||
|
@ -112,11 +113,13 @@ export default class BattleMessageUiHandler extends MessageUiHandler {
|
|||
levelUpStatsContainer.add(levelUpStatsLabelsContent);
|
||||
|
||||
const levelUpStatsIncrContent = addTextObject(this.scene, (this.scene.game.canvas.width / 6) - 50, -94, "+\n+\n+\n+\n+\n+", TextStyle.WINDOW, { maxLines: 6 });
|
||||
levelUpStatsIncrContent.setLineSpacing(i18next.resolvedLanguage === "ja" ? 25 : 5);
|
||||
levelUpStatsContainer.add(levelUpStatsIncrContent);
|
||||
|
||||
this.levelUpStatsIncrContent = levelUpStatsIncrContent;
|
||||
|
||||
const levelUpStatsValuesContent = addBBCodeTextObject(this.scene, (this.scene.game.canvas.width / 6) - 7, -94, "", TextStyle.WINDOW, { maxLines: 6, lineSpacing: 5});
|
||||
levelUpStatsValuesContent.setLineSpacing(i18next.resolvedLanguage === "ja" ? 25 : 5);
|
||||
levelUpStatsValuesContent.setOrigin(1, 0);
|
||||
levelUpStatsValuesContent.setAlign("right");
|
||||
levelUpStatsContainer.add(levelUpStatsValuesContent);
|
||||
|
|
|
@ -58,6 +58,7 @@ export default class MoveInfoOverlay extends Phaser.GameObjects.Container implem
|
|||
|
||||
// set up the description; wordWrap uses true pixels, unaffected by any scaling, while other values are affected
|
||||
this.desc = addTextObject(scene, (options?.onSide && !options?.right ? EFF_WIDTH : 0) + BORDER, (options?.top ? EFF_HEIGHT : 0) + BORDER - 2, "", TextStyle.BATTLE_INFO, { wordWrap: { width: (width - (BORDER - 2) * 2 - (options?.onSide ? EFF_WIDTH : 0)) * GLOBAL_SCALE } });
|
||||
this.desc.setLineSpacing(i18next.resolvedLanguage === "ja" ? 25 : 5);
|
||||
|
||||
// limit the text rendering, required for scrolling later on
|
||||
const maskPointOrigin = {
|
||||
|
|
Loading…
Reference in New Issue