Reworked RecrownedGTK tools.

This commit is contained in:
2020-05-18 16:44:25 -05:00
parent 635ed9fb7d
commit ef806b8174
27 changed files with 147 additions and 356 deletions

View File

@@ -17,12 +17,12 @@ namespace RecrownedGTK.Tools.ConsoleInterface
}
private class ConsoleOutput : IUserOutput {
public void Output(string output) {
Console.WriteLine(output);
public void WriteLine(string output) {
Console.WriteLine(ConsoleUtilities.WrapMessageToConsoleWidth(output));
}
public void WrappedOutput(string output) {
ConsoleUtilities.WrapMessageToConsoleWidth(output);
public void Write(string output) {
Console.Write(ConsoleUtilities.WrapMessageToConsoleWidth(output));
}
public void ClearOutput() {

View File

@@ -12,7 +12,7 @@ namespace RecrownedGTK.Tools.ConsoleInterface
int currentLineSize = 0;
for (int i = 0; i < words.Length; i++)
{
if (currentLineSize + words[i].Length >= Console.BufferWidth - Console.CursorLeft -1)
if (currentLineSize + words[i].Length > Console.BufferWidth - Console.CursorLeft)
{
currentLineSize = 0;
stringBuilder.AppendLine();
@@ -32,7 +32,6 @@ namespace RecrownedGTK.Tools.ConsoleInterface
stringBuilder.Append(' ');
}
}
stringBuilder.AppendLine();
return stringBuilder.ToString();
}
}