Text wrap issue in dialog? (Editor 1.6.0)

Started by deadsuperhero, April 04, 2019, 03:45:20 AM

Previous topic - Next topic
I'm playing with NPCs and dialog to get a feel for how conversations are supposed to work.

One thing that I've noticed is that long lines don't seem to break off at a correct length, and expand through the message box, like so:



it looks like this might just be a bug with the base game that gets generated when creating a new quest, and I guess it's possible to modify the message box to fit the width in some way, but is there a particular reason that long text doesn't correctly wrap? Do I need to insert a newline symbol in my dialog strings?
Sent from your dad's iPhone

If you are using the quest editor, then just start a new line where you want the line break to occur.

If you are editing the dialogs.dat file in a text editor, then you'd do it like this:
Code (lua) Select

dialog{
  id = "my_dialog",
  text = [[
You're probably wondering what's
going to happen.
]]}


Advanced users could write their own custom dialog box script that does automatically wrap text by detecting the line length and inserting line breaks appropriately. The one included with Solarus, however, requires adding manual line breaks.

Got it, thanks for pointing me in the right direction here. It might not be a crazy idea to include wrapping capabilities as a sane default in a future version, perhaps.
Sent from your dad's iPhone