Adventure Game Studio

AGS Support => Beginners' Technical Questions => Topic started by: WHAM on Tue 12/07/2016 16:25:57

Title: Limit to line break characters [
Post by: WHAM on Tue 12/07/2016 16:25:57
Hello!

I am trying to create a long block of text the player can scroll via an in-game UI.

Since there is a limit to how many characters I can add in a single line, I did a function as follows to initialize the label:

Code (ags) Select

function InitConsole() {
  String foo = "";
  foo = String.Format("Block of text[Block of text[Block of text[");
  labConsole.Text = labConsole.Text.Append(foo);
  foo = String.Format("Block of text[Block of text[Block of text[");
  labConsole.Text = labConsole.Text.Append(foo);
  foo = String.Format("Block of text[Block of text[Block of text[");
  labConsole.Text = labConsole.Text.Append(foo);
// Repeat a bunch of times until all the text is in the label


As far as I can tell the function itself is working, but after a certain number of line breaks ( [ ) the text just ends with AGS adding three dots '...' at the end.
Can someone confirm if this really is the case and I can only have 31 or 32 (as seems to be the case as far as I can tell) line breaks per String?
Title: Re: Limit to line break characters [
Post by: Crimson Wizard on Tue 12/07/2016 18:18:43
From what I see in the engine code, there could be 50 lines (or 49 line wraps) only. This is a restriction of text drawing function.
Title: Re: Limit to line break characters [
Post by: WHAM on Tue 12/07/2016 18:33:21
Quote from: Crimson Wizard on Tue 12/07/2016 18:18:43
From what I see in the engine code, there could be 50 lines (or 49 line wraps) only. This is a restriction of text drawing function.

Drat. Looks like I'm dividing the text into multiple labels then. :)
Title: Re: Limit to line break characters [
Post by: dayowlron on Tue 12/07/2016 21:57:16
I was faced with that same thing once. I created a graphic that had the text on it and just used the graphical functions.