Example #1
0
    public void drawText(spritebatchextension batcher, string text, float x, float y, float sx, float sy, float tx, float ty)
    {
        int len = text.Length;

        for (int i = 0; i < len; i++)
        {
            int c = text[i] - ' ';

            if (c < 0 || c > glyphs.Length - 1)
            {
                continue;
            }

            TextureRegion glyph = glyphs[c];
            batcher.drawSprite(x, y, sx * glyphWidth, sy * glyphHeight, glyph);
            x += glyphWidth * (tx);
        }
    }
Example #2
0
 public void drawText(spritebatchextension batcher, string text, float x, float y)
 {
     drawText(batcher, text, x, y, 1, 1, 1, 1);
 }