30 lines
453 B
Go
30 lines
453 B
Go
// +build ignore
|
|
|
|
package main
|
|
|
|
import (
|
|
"log"
|
|
|
|
ui "git.tebitea.media/sashakoshka/termui/v3"
|
|
"git.tebitea.media/sashakoshka/termui/v3/widgets"
|
|
)
|
|
|
|
func main() {
|
|
if err := ui.Init(); err != nil {
|
|
log.Fatalf("failed to initialize termui: %v", err)
|
|
}
|
|
defer ui.Close()
|
|
|
|
p := widgets.NewParagraph()
|
|
p.Text = "Hello World!"
|
|
p.SetRect(0, 0, 25, 5)
|
|
|
|
ui.Render(p)
|
|
|
|
for e := range ui.PollEvents() {
|
|
if e.Type == ui.KeyboardEvent {
|
|
break
|
|
}
|
|
}
|
|
}
|