2
0
mirror of https://github.com/rivo/tview.git synced 2024-11-15 06:12:46 +00:00

Merge branch 'ajcarvajal-master'

This commit is contained in:
Oliver 2020-02-19 22:08:16 +01:00
commit cd38d74324

View File

@ -45,14 +45,18 @@ func TextView1(nextSlide func()) (title string, content tview.Primitive) {
go func() { go func() {
var n int var n int
for { for {
n++ if textView.HasFocus() {
if n > 512 { n++
n = 1 if n > 512 {
textView.SetText("") n = 1
} textView.SetText("")
}
fmt.Fprintf(textView, "%d ", n) fmt.Fprintf(textView, "%d ", n)
time.Sleep(200 * time.Millisecond) time.Sleep(200 * time.Millisecond)
} else {
time.Sleep(time.Second)
}
} }
}() }()
textView.SetBorder(true).SetTitle("TextView implements io.Writer") textView.SetBorder(true).SetTitle("TextView implements io.Writer")