stone/examples/hello/main.go

39 lines
1011 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, 1, ':')
application.SetRune(5, 1, '3')
application.SetRune(0, 2, 'A')
application.SetRune(1, 2, 'A')
application.SetRune(2, 2, 'A')
application.SetRune(3, 2, 'A')
application.SetRune(4, 2, 'A')
application.SetRune(5, 2, 'A')
application.SetRune(6, 2, 'A')
application.SetRune(7, 2, 'A')
application.SetRune(8, 2, 'A')
}
if !application.Await(0) { break }
}
}