public void changeText(string newText) { letters = new TextLetter[newText.Length]; char[] ls = newText.ToCharArray(); for (int x = 0; x < newText.Length; x++) { letters[x] = new TextLetter(ls[x], letterSize, null); } }
public RawText(ContentManager Content, string fontName, string t, Vector2 loc) { font = Content.Load<Texture2D>("Fonts/" + fontName + ".png"); StreamReader fontMeta = new StreamReader("Content/Fonts/" + fontName + ".png_meta"); letterSize = new Vector2(int.Parse(fontMeta.ReadLine()), int.Parse(fontMeta.ReadLine())); fontMeta.Close(); location = loc; letters = new TextLetter[t.Length]; char[] ls = t.ToCharArray(); for (int x = 0; x < t.Length; x++) { letters[x] = new TextLetter(ls[x], letterSize, null); } }
public RawText(ContentManager Content, string fontName, string t, Vector2 loc) { font = Content.Load <Texture2D>("Fonts/" + fontName + ".png"); StreamReader fontMeta = new StreamReader("Content/Fonts/" + fontName + ".png_meta"); letterSize = new Vector2(int.Parse(fontMeta.ReadLine()), int.Parse(fontMeta.ReadLine())); fontMeta.Close(); location = loc; letters = new TextLetter[t.Length]; char[] ls = t.ToCharArray(); for (int x = 0; x < t.Length; x++) { letters[x] = new TextLetter(ls[x], letterSize, null); } }