What is the maximum string lenght? [SOLVED:2000 characters/35 lines]

Started by .M.M., Mon 02/02/2009 12:00:21

Previous topic - Next topic

.M.M.

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?

Khris

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).

Pumaman

GUI Labels are limited to 2000 characters of text, or 35 lines, whichever comes first.

GarageGothic

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.

.M.M.

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.

Pumaman

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?

.M.M.

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

SMF spam blocked by CleanTalk