Exemple #1
0
 /// <summary>
 /// Draws a string to the screen
 /// </summary>
 /// <param name="text">The string to draw</param>
 /// <param name="point">The point to begin drawing at</param>
 /// <param name="fgColour">The colour to draw with</param>
 public void DrawString(string text, Point point, ConsoleColor fgColour = ConsoleColor.Gray)
 {
     for (int i = 0; i < text.Length; i++)
     {
         FrameBufferPixel currentPoint = _frameBuffer.RawFrameBuffer[point.X + i, point.Y];
         _frameBuffer.RawFrameBuffer[point.X + i, point.Y] = new FrameBufferPixel()
         {
             BackgroundColour = currentPoint.BackgroundColour, ForegroundColour = fgColour, Character = text[i]
         };
     }
     ;
 }
 internal static bool NotEqual(FrameBufferPixel pix1, FrameBufferPixel pix2)
 {
     return(pix1 != null ? pix1.Character != pix2.Character || pix1.BackgroundColour != pix2.BackgroundColour || pix1.ForegroundColour != pix2.ForegroundColour : true);
 }