stone/examples/hello/main.go
2022-11-05 18:43:57 -04:00

30 lines
705 B
Go

package main
import "git.tebibyte.media/sashakoshka/stone"
import _ "git.tebibyte.media/sashakoshka/stone/backends/pixel"
func main () {
application := stone.Application { }
application.Run(run)
}
func run (application *stone.Application) {
for {
if application.Resized() {
application.SetRune(0, 0, 'h')
application.SetRune(1, 0, 'e')
application.SetRune(2, 0, 'l')
application.SetRune(3, 0, 'l')
application.SetRune(4, 0, 'o')
application.SetRune(5, 0, 'r')
application.SetRune(6, 0, 'l')
application.SetRune(7, 0, 'd')
application.SetRune(8, 0, '!')
application.SetRune(4, 4, ':')
application.SetRune(5, 4, '3')
}
if !application.Await(0) { break }
}
}