Пример #1
0
        public void DrawString(Font textureFont, string text, ref Rect rect, Color color, TextAlignment textAlignment)
        {
            int     length = textureFont.BestWidthFit(text, rect.W);
            Vector2 align  = GetAlignment(textureFont, text, 0, length, ref rect, textAlignment);

            this.batch.BufferSubString(textureFont, text, 0, length, new Vector2(rect.X, rect.Y), color, align, Vector2.One);
        }