public CustomMemorialText(CustomMemorial memorial, bool dreamy, string text, float spacing) : base() { Tag = Tags.HUD | Tags.PauseUpdate; Add(textSfx = new SoundSource()); Dreamy = dreamy; Memorial = memorial; Message = text; Spacing = spacing; firstLineLength = CountToNewline(0); string[] lines = text.Split('\n'); lineWidths = new float[lines.Length]; for (int i = 0; i < lines.Length; i++) { lineWidths[i] = ActiveFont.Measure(lines[i]).X + spacing * lines[i].Length; } charChars = ActiveFont.Font.Get(ActiveFont.BaseSize).Characters; }
public CustomMemorialText(CustomMemorial memorial, bool dreamy, string text) : base() { AddTag(Tags.HUD); AddTag(Tags.PauseUpdate); Add(textSfx = new SoundSource()); Dreamy = dreamy; Memorial = memorial; message = text; firstLineLength = CountToNewline(0); for (int i = 0; i < message.Length; i++) { float width = ActiveFont.Measure(message[i]).X; if (width > widestCharacter) { widestCharacter = width; } } widestCharacter *= 0.9f; }