Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Class Textutils
- Shared Function Type(ByVal text As String)
- For Each cha As String In text
- Console.Write(cha)
- Threading.Thread.Sleep(20)
- Next
- Return True
- End Function
- Shared Function Type(ByVal text As String, ByVal speed As Integer)
- For Each cha As String In text
- Console.Write(cha)
- Threading.Thread.Sleep(speed)
- Next
- Return True
- End Function
- Shared Function TypeArray(ByVal text As Array)
- Dim ypos = Console.CursorTop
- Dim max = 0
- For Each line In text
- max = Math.Max(max, line.length)
- Next
- For i = 0 To max - 1
- For Each line In text
- Try
- Console.Write(line.substring(i, 1))
- Catch ex As Exception
- Console.Write("")
- End Try
- Console.CursorTop += 1
- Console.CursorLeft = i
- Next
- Console.CursorTop = ypos
- Console.CursorLeft = i + 1
- Next
- Return True
- End Function
- Shared Function TypeArray(ByVal text As Array, ByVal speed As Integer)
- Dim ypos = Console.CursorTop
- Dim max = 0
- For Each line In text
- max = Math.Max(max, line.length)
- Next
- For i = 0 To max - 1
- Threading.Thread.Sleep(speed)
- For Each line In text
- Try
- Console.Write(line.substring(i, 1))
- Catch ex As Exception
- Console.Write("")
- End Try
- Console.CursorTop += 1
- Console.CursorLeft = i
- Next
- Console.CursorTop = ypos
- Console.CursorLeft = i + 1
- Next
- Return True
- End Function
- End Class
Advertisement
Add Comment
Please, Sign In to add comment