40 lines
852 B
Go
40 lines
852 B
Go
package main
|
|
|
|
import (
|
|
"git.crumpington.com/public/tui"
|
|
)
|
|
|
|
func main() {
|
|
tui.Start()
|
|
defer tui.Stop()
|
|
|
|
c := tui.GetMenu(
|
|
"Menu",
|
|
"Some long or short text.",
|
|
"aa", "Accessory long text description with some other stuff. Whatever.",
|
|
"b", "Bass",
|
|
"c", "Case",
|
|
"e", "Email address\n\naddr")
|
|
tui.PrintString("Got %s", c)
|
|
tui.GetString("...")
|
|
|
|
tui.PrintLine()
|
|
tui.GetString("What would you like? ")
|
|
|
|
tui.Clear()
|
|
|
|
tui.GetString("...")
|
|
tui.Clear()
|
|
|
|
tui.PrintBoxed("the rain in spain falls mainly in the plane. The rain in spain falls mainlyx in the plane.")
|
|
tui.GetString("...")
|
|
tui.Clear()
|
|
|
|
tui.PrintTextWithPrefix(" ", "the rain in spain falls mainly in the plane. The rain in spain fallsxxx mainly in the plane.")
|
|
tui.GetString("...")
|
|
tui.Clear()
|
|
|
|
i := tui.GetInt("an integer: ")
|
|
tui.PrintTextWithPrefix("", "Got %d", i)
|
|
}
|