Fix WriteCenteredLines

This commit is contained in:
Zev Spitz
2022-01-23 00:26:12 +02:00
parent 41fdd87047
commit 4f032310ad
@@ -12,8 +12,10 @@
Public Overrides Sub WriteCenteredLines(value As Object)
If Console.CursorLeft <> 0 Then WriteLine()
Dim toWrite = If(value?.ToString, "")
Write($"{Space((Console.WindowWidth - toWrite.Length) \ 2)}{toWrite}")
WriteLine()
For Each line In toWrite.Split(Environment.NewLine)
Write($"{Space((Console.WindowWidth - line.Length) \ 2)}{line}")
WriteLine()
Next
End Sub
Public Overrides Function ReadLine() As String