Skip to content

Commit

Permalink
SC no longer always pad letter displays.
Browse files Browse the repository at this point in the history
  • Loading branch information
PoneyClairDeLune committed Sep 23, 2023
1 parent dc535bc commit 062a041
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/disp/disp_sc.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ let ScDisplay = class extends RootDisplay {
let original = sum.letter.text,
leftTrim = original.length - original.trimLeft().length,
rightTrim = original.length - original.trimRight().length;
if (original.length > infoTxt.length && infoTxt.length < 16) {
if (original.length > 16 && original.length > infoTxt.length && infoTxt.length < 16) {
if (leftTrim > 0) {
while(infoTxt.length < 15) {
infoTxt = ` ${infoTxt} `;
Expand All @@ -159,6 +159,8 @@ let ScDisplay = class extends RootDisplay {
};
};
};
} else if (original.length <= 16) {
infoTxt = original;
};
let xShift = 0;
if (infoTxt.length > 16) {
Expand All @@ -170,6 +172,7 @@ let ScDisplay = class extends RootDisplay {
xShift = 0;
};
};
console.debug(`"${infoTxt}"`);
this.xgFont.getStr(infoTxt).forEach(function (e0, i0) {
e0.forEach(function (e1, i1) {
let pX = i0 * 6 + i1 % 5 + xShift,
Expand Down

0 comments on commit 062a041

Please sign in to comment.