public static void Write(SrkFont font, string text, float scale, float limit, Color foreColor) { if (text.Length == 0) { return; } currentFont = font; currentFont = font; yOffset = 0; totalWidth = 0; MinBounds.X = Single.MaxValue; MinBounds.Y = Single.MaxValue; MaxBounds.X = Single.MinValue; MaxBounds.Y = Single.MinValue; string[] spli = text.Split(' '); for (int i = 0; i < spli.Length; i++) { string txt = spli[i]; if (i < spli.Length - 1) { txt += " "; } WriteLine(txt, scale, foreColor); if (!Single.IsNaN(limit) && totalWidth > limit) { totalWidth = 0; if (i < spli.Length - 1) { yOffset -= scale * currentFont.Height * Bulle.Scale.X * 0.4f; } } } WordCount++; Length += 6; }
public static void InitFonts() { Speech = new SrkFont("Speech", new Color(84, 34, 20)); }