Limit to line break characters [

Started by WHAM, Tue 12/07/2016 16:25:57

Previous topic - Next topic

WHAM

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

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?
Wrongthinker and anticitizen one. Utterly untrustworthy. Pending removal to memory hole.

Crimson Wizard

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.

WHAM

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. :)
Wrongthinker and anticitizen one. Utterly untrustworthy. Pending removal to memory hole.

dayowlron

I was faced with that same thing once. I created a graphic that had the text on it and just used the graphical functions.
Pro is the opposite of Con                       Kids of today are so much different
This fact can clearly be seen,                  Don't you know?
If progress means to move forward         Just ask them where they are from
Then what does congress mean?             And they tell you where you can go.  --Nipsey Russell

SMF spam blocked by CleanTalk