Magistross wrote:Hi @Smileh, this shouldn't be too hard.
You can easily center the text of every line by adjusting the horizontal aligment of the SpriteFont object to center and be done with it.
But if you want it to adapt according to which side is the portrait, simply add a "Set horizontal alignment to right" on event 16 (under the "Set Mirrored" action). I would also make sure the spritefont revert to the default left aligment by adding a "Set horizontal alignment to left" on event 12.
Magistross wrote:The size of the spritefont is set on event 12.
Here's the formula for the height : DIALOGUE_HEIGHT - DIALOGUE_MARGIN * 2 + DIALOGUE_LINEHEIGHT
If your spritefont's lineheight property doesn't fit 2 times in that, only one line will ever show. You could either tweak the variable values, or the change the formula so it uses a new variable with a value distinct from the DIALOGUE_MARGIN.
Smileh wrote:If I set text alignment to the right, can I make the scrolling of the text also to change it's direction? It "grows" in a weird way.
"Hello s "
"Hello si "
"Hello sir "
"Hello sir !"
Users browsing this forum: No registered users and 1 guest