2
0
mirror of https://github.com/rivo/tview.git synced 2024-11-15 06:12:46 +00:00
tview/demos/presentation/end.go
2023-08-26 16:19:31 +02:00

21 lines
473 B
Go

package main
import (
"fmt"
"github.com/gdamore/tcell/v2"
"github.com/rivo/tview"
)
// End shows the final slide.
func End(nextSlide func()) (title string, content tview.Primitive) {
textView := tview.NewTextView().
SetDynamicColors(true).
SetDoneFunc(func(key tcell.Key) {
nextSlide()
})
url := "[:::https://github.com/rivo/tview]https://github.com/rivo/tview"
fmt.Fprint(textView, url)
return "End", Center(tview.TaggedStringWidth(url), 1, textView)
}