Fix additional line break bug

pull/65/head
Flashfyre 2024-04-08 21:10:53 -04:00
parent 665eece2ac
commit 611d78718d
2 changed files with 4 additions and 2 deletions

View File

@ -29,6 +29,7 @@ splashMessages.push(...[
'You Do Not Start at Level 2000!',
'Also Try Pokéngine!',
'Also Try Emerald Rogue!',
'Also Try Radical Red!',
'Eevee Expo!',
'YNOproject!'
]);

View File

@ -54,7 +54,8 @@ export default abstract class MessageUiHandler extends AwaitableUiHandler {
let lastLineCount = 1;
let newText = '';
for (let w = 0; w < textWords.length; w++) {
const nextWordText = `${newText} ${textWords[w]}`;
const nextWordText = newText ? `${newText} ${textWords[w]}` : textWords[w];
if (textWords[w].includes('\n')) {
newText = nextWordText;
lastLineCount++;
@ -68,7 +69,7 @@ export default abstract class MessageUiHandler extends AwaitableUiHandler {
}
}
text = newText.trimStart();
text = newText;
}
if (this.textTimer) {