RhenaudTheLukark / CreateYourFrisk

Rhenaud The Lukark's Unitale fork
GNU General Public License v3.0
133 stars 56 forks source link

[Issue] Text positioning not 100% consistent #27

Closed TomaszewskiPatryk closed 5 years ago

TomaszewskiPatryk commented 5 years ago

Describe the bug When changing the font (with [font:]) inside a text object, the text is displaced in the same line. However, in the following lines, it's again placed as it should be (as long as you won't change the font again).

Code to reproduce

Text = CreateText({"[font:uidialog]First","Not first","[font:monster]Also not first","Fourth"},{320, 240},150,"Top",150)

Workaround If anyone else is struggling with this, there is a partial workaround for it. Whenever you are changing the font at the beginning of a line, create an additional empty line before it ending with [next] and change the font there.

Text = CreateText({"[font:uidialog][next]","First","Not first","[font:monster][next]","Also not first","Fourth"},{320, 240},150,"Top",150)

If you are changing font mid-line, then you are doomed I can't help you.

Setup:

RhenaudTheLukark commented 5 years ago

It's fixed, like I told you it was in PM

TomaszewskiPatryk commented 5 years ago

Sorry, posted this before your message :P