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