Hey guys,
I’m using Rex’ Plugins for Typing and BBCode Text.
Unfortunately the text wrapping is a little wiggly.
Example:
“This is the first line. After this one the text ist wrapped.
Now the second line is here.”
The word “Now” is on line two. But while typing it’s displayed in the first line first and then jumps to the second line. I uploaded a video to demonstrate this.
You can see this in the first Text with “Choose an…” and when talking to the blonde character with "…is already…
Here’s the code:
const textboxWidth = 700
const textPadding = 20
this.text = this.scene.add.rexBBCodeText(x, y, '', getTextStyle(textboxWidth))
this.text.setScrollFactor(0).setOrigin(0, 0).setPadding(texPadding)
this.typer = this.scene.textTyper.add(this.text)
this.typer.start(text, 30)
...
const getTextStyle = (width) => {
return {
lineSpacing: 10,
fontFamily: DEFAULT_FONT,
wrap: { // For bbcode text
mode: 'word',
width,
},
wordWrap: { width }, // For normal text
}
}
Any ideas? I would be very greatful.
Best regards
Nick