示例#1
0
 public override void Draw(ZSpriteBatch spriteBatch)
 {
     int currY;
     currY = y;
     spriteBatch.DrawRectangle(X, Y, width, height, Color.Black);
     foreach (string msg in messages)
     {
         foreach (string line in textReader.Lines(msg))
         {
             currY += font.LineSpacing;
             if (currY > Y + Height)
                 return;
             else
             {
                 spriteBatch.DrawString(font, line, new Vector2(X, currY), color);
             }
         }
     }
 }
示例#2
0
        public override void Draw(ZSpriteBatch spriteBatch)
        {
            int currY;

            currY = y;
            spriteBatch.DrawRectangle(X, Y, width, height, Color.Black);
            foreach (string msg in messages)
            {
                foreach (string line in textReader.Lines(msg))
                {
                    currY += font.LineSpacing;
                    if (currY > Y + Height)
                    {
                        return;
                    }
                    else
                    {
                        spriteBatch.DrawString(font, line, new Vector2(X, currY), color);
                    }
                }
            }
        }
示例#3
0
 public new void DrawString(SpriteFont font, string line, Vector2 position, Color color)
 {
     spriteBatch.DrawString(font, line, Offset + position, color);
 }