stone/examples/hello/main.go

39 lines
1011 B
Go
Raw Normal View History

2022-10-31 13:51:28 -06:00
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) {
2022-11-05 16:43:57 -06:00
for {
2022-10-31 13:51:28 -06:00
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, '!')
2022-11-05 16:56:56 -06:00
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')
2022-10-31 13:51:28 -06:00
}
2022-11-05 16:43:57 -06:00
if !application.Await(0) { break }
2022-10-31 13:51:28 -06:00
}
}