SOLVED: Label text char

Started by Slasher, Mon 10/11/2014 08:03:40

Previous topic - Next topic

Slasher

Hi,

Just a quicky.

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


monkey0506

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.

Slasher

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
 
}
 //Global Rep Exec
 if (LNotes4.Text.Length >=2000) {
 Lab4full=true;
}


Code: ags

// 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 ;)


Crimson Wizard

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.

Slasher

Hi Crimson,

I will bear that in mind.

Cheers ;)

Crimson Wizard

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.

SMF spam blocked by CleanTalk