23 lines
447 B
Go
23 lines
447 B
Go
package main
|
|
|
|
import "log"
|
|
import (
|
|
blt "bearlibterminal"
|
|
"ui"
|
|
"util"
|
|
)
|
|
|
|
func main() {
|
|
log.Println("Starting...")
|
|
blt.Open()
|
|
defer blt.Close()
|
|
blt.Print(1, 1, "Hello, world!")
|
|
blt.Refresh()
|
|
var exit = false
|
|
for !exit {
|
|
exit, _ = util.InArray(blt.Read(), []int{blt.TK_CLOSE, blt.TK_ESCAPE})
|
|
blt.Print( 1, 3, "Key: " + ui.ReadKey() )
|
|
blt.Refresh()
|
|
}
|
|
log.Println("Closing...")
|
|
} |