Support => Other Packages => Topic started by: schwarzenego on January 27, 2015, 01:01:44 AM
Title: HUD Text - Multiline?
Post by: schwarzenego on January 27, 2015, 01:01:44 AM
Hey,
Im trying to use the HUDText script as a "log shower", so basically multiple scripts ask for a log, it is shown in the screen at the hud text position, and HUDText neatly moves them up if needed to. However, I altered a bit of the script to change the default label created by it, including changing it from ResizeFreely to ResizeHeight, but, as you can imagine, when a log with 2+ lines show up, they just get one over the other.
Is there some easy way to fix this, maybe change the offset calculation a little bit?
Anyway, thanks!
Title: Re: HUD Text - Multiline?
Post by: ArenMook on January 28, 2015, 02:45:43 AM
Instead of simply calling hudtext.Add(text), split it up into multiple lines first.
string[] lines = text.Split('\n');
foreach(string s in lines) hudtext.Add(s, ...);
P.S. Although you may need to add them in reverse order instead.