mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2024-11-26 08:46:55 +00:00
Fix additional line break bug
This commit is contained in:
parent
665eece2ac
commit
611d78718d
@ -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!'
|
||||
]);
|
@ -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) {
|
||||
|
Loading…
Reference in New Issue
Block a user