More Than One Line [SOLVED]

Started by Atelier, Thu 29/04/2010 17:22:10

Previous topic - Next topic

Atelier

I'm using a list box to display the responses for my game:



As you can see it has no problem displaying smaller snippets of text (top), but when it comes to longer descriptions it carries on and on. Is there a simple way to get the text to carry onto a second or even third line? I preferably wanted all the text to still be in the same slot (without having to portion it up), but I'd be really grateful for any other suggestions.

Thanks,
AtelierGames

Calin Leafshade

can you use the new line escape character with list boxes?

i think the new line character for ags is the backslash.. try sticking that in.

Atelier

The new line operator is [, but unfortunately no, it doesn't work with a list box. :-\

Calin Leafshade

then you have alot of scripting ahead of you :p

essentially you need to use that font width function that tells you how long a stream of text is in pixels to split it up.

Atelier

#4
I bring great news! I just found this great code by monkey, and with tweaking, it does exactly the job I wanted!



Unfortunately it has the undesirable side-effect of not associating the response with the input. :- But not something that is impossible to fix. I said it wasn't. Thanks monkey for the code!


SMF spam blocked by CleanTalk