cview/demos/presentation/end.go

19 lines
391 B
Go
Raw Normal View History

package main
import (
"fmt"
"github.com/gdamore/tcell"
2020-01-22 23:28:19 +00:00
"gitlab.com/tslocum/cview"
)
// End shows the final slide.
func End(nextSlide func()) (title string, content cview.Primitive) {
textView := cview.NewTextView().SetDoneFunc(func(key tcell.Key) {
nextSlide()
})
2020-01-22 23:28:19 +00:00
url := "https://gitlab.com/tslocum/cview"
fmt.Fprint(textView, url)
return "End", Center(len(url), 1, textView)
}