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:
commit
cd38d74324
@ -45,6 +45,7 @@ func TextView1(nextSlide func()) (title string, content tview.Primitive) {
|
||||
go func() {
|
||||
var n int
|
||||
for {
|
||||
if textView.HasFocus() {
|
||||
n++
|
||||
if n > 512 {
|
||||
n = 1
|
||||
@ -53,6 +54,9 @@ func TextView1(nextSlide func()) (title string, content tview.Primitive) {
|
||||
|
||||
fmt.Fprintf(textView, "%d ", n)
|
||||
time.Sleep(200 * time.Millisecond)
|
||||
} else {
|
||||
time.Sleep(time.Second)
|
||||
}
|
||||
}
|
||||
}()
|
||||
textView.SetBorder(true).SetTitle("TextView implements io.Writer")
|
||||
|
Loading…
Reference in New Issue
Block a user