fix(nds): use fillTextHCentered instead of fillTextCentered (caused alignment issues in different langs)

This commit is contained in:
2026-02-26 20:01:09 +01:00
parent ec75f4777b
commit 4141580ac1
2 changed files with 6 additions and 8 deletions

View File

@@ -201,13 +201,11 @@ onRender((ctx) => {
ctx.font = "10px NDS10";
ctx.fillStyle = "#000000";
ctx.letterSpacing = "0px";
fillTextCentered(
fillTextHCentered(
ctx,
props.title,
props.x + 1,
// TODO: -10 is needed because fillTextCentered isn't using top baseline
// i will change that in the future (maybe)
Y + ARROW_IMAGE_HEIGHT * 2 + SQUARE_HEIGHT - 6,
Y + ARROW_IMAGE_HEIGHT * 2 + SQUARE_HEIGHT + 3,
downImage.value.rect.width,
);
}, 10);