...

Source file src/github.com/rivo/tview/demos/presentation/end.go

Documentation: github.com/rivo/tview/demos/presentation

     1  package main
     2  
     3  import (
     4  	"fmt"
     5  
     6  	"github.com/gdamore/tcell/v2"
     7  	"github.com/rivo/tview"
     8  )
     9  
    10  // End shows the final slide.
    11  func End(nextSlide func()) (title string, content tview.Primitive) {
    12  	textView := tview.NewTextView().SetDoneFunc(func(key tcell.Key) {
    13  		nextSlide()
    14  	})
    15  	url := "https://github.com/rivo/tview"
    16  	fmt.Fprint(textView, url)
    17  	return "End", Center(len(url), 1, textView)
    18  }
    19  

View as plain text