Adventure Game Studio

AGS Support => Beginners' Technical Questions => Topic started by: .M.M. on Mon 02/02/2009 12:00:21

Title: What is the maximum string lenght? [SOLVED:2000 characters/35 lines]
Post by: .M.M. on Mon 02/02/2009 12:00:21
I has written a  really long string, about 500 characters, for journal. The problem is, that when I want to show it in label, it is cutted and there are three dots at the end. The problem is not caused by label, it is big enough (three dots are in the middle of label). So, what is the maximum string lenght in AGS 3.0.2 SP1 and can I fix it somehow?
Title: Re: What is the maximum string lenght?
Post by: Khris on Mon 02/02/2009 17:43:32
Did you try other, shorter strings to find out when the string displays correctly?
If the three dots are right in the middle of the label, there's a small chance that this is a bug (as in AGS confuses low- and hires coords and cuts off the string where it wrongly perceives the label to end).
Title: Re: What is the maximum string lenght?
Post by: Pumaman on Mon 02/02/2009 20:17:16
GUI Labels are limited to 2000 characters of text, or 35 lines, whichever comes first.
Title: Re: What is the maximum string lenght?
Post by: GarageGothic on Mon 02/02/2009 20:36:33
As for workarounds, you could draw the text to a DynamicSprite (displayed as GUI background or as a button graphic) using DrawingSurface.DrawMessageWrapped. You might also try using a listbox instead, though that would require you to write your own linebreaking code to distribute the text across multiple listbox items.
Title: Re: What is the maximum string lenght?
Post by: .M.M. on Wed 04/02/2009 08:47:04
Quote from: Pumaman on Mon 02/02/2009 20:17:16
GUI Labels are limited to 2000 characters of text, or 35 lines, whichever comes first.
Thanks, 35 lines is the problem. It´s not too important for my game, but I needed to know that for next journal entries.
Title: Re: What is the maximum string lenght? [SOLVED:2000 characters/35 lines]
Post by: Pumaman on Wed 04/02/2009 18:28:26
I'm surprised you can fit 35 lines on the screen, unless the font is tiny!

Still, if this is a limitation for you, I can increase that 35 line restriction for a future version of AGS?
Title: Re: What is the maximum string lenght? [SOLVED:2000 characters/35 lines]
Post by: .M.M. on Thu 05/02/2009 09:34:28
Quote from: Pumaman on Wed 04/02/2009 18:28:26
I'm surprised you can fit 35 lines on the screen, unless the font is tiny!
I made big label, which can be moved up or down with slider.

Quote from: Pumaman on Wed 04/02/2009 18:28:26
Still, if this is a limitation for you, I can increase that 35 line restriction for a future version of AGS?
Is it possible? If yes, it could be really useful!  :D