mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2025-02-07 08:37:41 +00:00
Fix adding unintended space to beginning of messages
This commit is contained in:
parent
13167a3901
commit
b767a90464
@ -55,7 +55,6 @@ export default abstract class MessageUiHandler extends AwaitableUiHandler {
|
|||||||
let newText = '';
|
let newText = '';
|
||||||
for (let w = 0; w < textWords.length; w++) {
|
for (let w = 0; w < textWords.length; w++) {
|
||||||
const nextWordText = `${newText} ${textWords[w]}`;
|
const nextWordText = `${newText} ${textWords[w]}`;
|
||||||
console.log(nextWordText);
|
|
||||||
if (textWords[w].includes('\n')) {
|
if (textWords[w].includes('\n')) {
|
||||||
newText = nextWordText;
|
newText = nextWordText;
|
||||||
lastLineCount++;
|
lastLineCount++;
|
||||||
@ -69,7 +68,7 @@ export default abstract class MessageUiHandler extends AwaitableUiHandler {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
text = newText;
|
text = newText.trimStart();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (this.textTimer) {
|
if (this.textTimer) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user