Exemplo n.º 1
0
 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);
     }
 }
Exemplo n.º 2
0
 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);
     }
 }
Exemplo n.º 3
0
        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);
            }
        }
Exemplo n.º 4
0
 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);
     }
 }