Adventure Game Studio

AGS Support => Beginners' Technical Questions => Topic started by: Slasher on Mon 10/11/2014 08:03:40

Title: SOLVED: Label text char
Post by: Slasher on Mon 10/11/2014 08:03:40
Hi,

Just a quicky.

Has Label text char been raised from 2000 or 39 lines in 3.2.1. ?

Title: Re: Label text char
Post by: monkey0506 on Mon 10/11/2014 08:26:58
AFAIK there hasn't been any changes to the maximum label length, though I think CW was planning to remove that as part of removing various arbitrary limits. Is there a particular reason you need a single label to hold more than that, though? You might be able to work around it in the meantime.
Title: Re: Label text char
Post by: Slasher on Mon 10/11/2014 10:37:53
Hi Monkey,

QuoteIs there a particular reason you need a single label to hold more than that, though? You might be able to work around it in the meantime.
Yes. I have a number of labels that display as pages in a journal (so lots of text) which change on page change buttons - +.

Pages one and two are fine. Page 3 is what needs checking.

Anyhow I have made an if character text limit check and added a boolean (Lab4full):

Code (ags) Select

}
//Global Rep Exec
if (LNotes4.Text.Length >=2000) {
Lab4full=true;
}


Code (ags) Select

// In dDialogs
if(Lab4full==false)
LNotes4.Text=LNotes4.Text.Append(" Add Text here.");
else
LNotes5.Text=LNotes5.Text.Append(" Add Text here");


It all seems to work ok.

Cheers ;)

Title: Re: Label text char
Post by: Crimson Wizard on Mon 10/11/2014 10:42:25
It seems you've solved your problem, but I think it is worth mentioning that you may also store your strings in your own (global) variables, and draw them on GUI sprite with DrawingSurface.DrawString and DrawStringWrapped.
This way you may display as much text as you want, in any layout.
Title: SOLVED: Re: Label text char
Post by: Slasher on Mon 10/11/2014 10:50:52
Hi Crimson,

I will bear that in mind.

Cheers ;)
Title: Re: SOLVED: Label text char
Post by: Crimson Wizard on Tue 11/11/2014 10:28:38
Actually the DrawStringWrapped has same 50 lines limit :shocked:. AGS uses same line-breaking system for everything, and the limit is 50 lines.

This must be fixed in 3.4.0.