mirror of
https://github.com/coding-horror/basic-computer-games.git
synced 2026-06-26 08:23:56 -07:00
Fix WriteCenteredLines
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user