Fix console background color

- Save & Restore background color when needed
- Remove useless color modifications
- Fix issue #71
This commit is contained in:
ORelio 2015-03-25 19:45:50 +01:00
parent aaced855d8
commit 82c95be611
2 changed files with 6 additions and 9 deletions

View file

@ -193,8 +193,6 @@ namespace MinecraftClient
writing_lock = true;
if (reading)
{
ConsoleColor fore = Console.ForegroundColor;
ConsoleColor back = Console.BackgroundColor;
string buf = buffer;
string buf2 = buffer2;
ClearLineAndBuffer();
@ -208,8 +206,6 @@ namespace MinecraftClient
}
else Console.Write("\b \b");
Console.Write(text);
Console.ForegroundColor = ConsoleColor.Gray;
Console.BackgroundColor = ConsoleColor.Black;
buffer = buf;
buffer2 = buf2;
Console.Write(">" + buffer);
@ -218,8 +214,6 @@ namespace MinecraftClient
Console.Write(buffer2 + " \b");
for (int i = 0; i < buffer2.Length; i++) { GoBack(); }
}
Console.ForegroundColor = fore;
Console.BackgroundColor = back;
}
else Console.Write(text);
writing_lock = false;