I don't know how it works, I don't want to know but it works so I won't touch it from now

This commit is contained in:
JFronny 2020-06-12 15:40:08 +02:00
parent b56fb7db78
commit 4abc39d48b
2 changed files with 10 additions and 5 deletions

View File

@ -79,6 +79,11 @@ namespace CLITest
}
Console.ResetColor();
Console.Clear();
Console.WriteLine("Test2");
Thread.Sleep(100);
DiffDraw.Clear(10, 10);
DiffDraw.Draw(true, false);
Console.Clear();
Console.WriteLine("Bye");
}
}

View File

@ -40,13 +40,13 @@ namespace CC_Functions.Commandline.TUI
{
for (int x = 0; x < width; x++)
{
Pixel? tmp1 = Screen[y, x];
if (full && tmp1 == _last[y, x]) continue;
if (tmp1 != null && color)
Pixel tmp1 = Screen[y, x];
if (!full && tmp1 == _last[y, x]) continue;
if (ReferenceEquals(tmp1, null) && color)
{
if (Console.ForegroundColor != tmp1.ForeColor)
if (Console.ForegroundColor != tmp1?.ForeColor && tmp1?.ForeColor != null)
Console.ForegroundColor = tmp1.ForeColor;
if (Console.BackgroundColor != tmp1.BackColor)
if (Console.BackgroundColor != tmp1?.BackColor && tmp1?.ForeColor != null)
Console.BackgroundColor = tmp1.BackColor;
}
Console.CursorLeft = x;