Author Topic: Text wrap issue in dialog? (Editor 1.6.0)  (Read 2365 times)

deadsuperhero

  • Newbie
  • *
  • Posts: 6
  • Monster Truck Connoisseur
    • View Profile
    • DeadSuperHero Social
Text wrap issue in dialog? (Editor 1.6.0)
« on: April 04, 2019, 03:45:20 am »
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

llamazing

  • Full Member
  • ***
  • Posts: 201
    • View Profile
Re: Text wrap issue in dialog? (Editor 1.6.0)
« Reply #1 on: April 04, 2019, 03:58:43 am »
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.

deadsuperhero

  • Newbie
  • *
  • Posts: 6
  • Monster Truck Connoisseur
    • View Profile
    • DeadSuperHero Social
Re: Text wrap issue in dialog? (Editor 1.6.0)
« Reply #2 on: April 04, 2019, 09:57:51 am »
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