This repository has been archived on 2023-08-08. You can view files and clone it, but cannot push or open issues or pull requests.
tomo-old/examples/drawing/main.go

23 lines
527 B
Go
Raw Normal View History

2023-01-20 16:05:48 -07:00
package main
import "git.tebibyte.media/sashakoshka/tomo"
2023-05-02 20:19:29 -06:00
import "git.tebibyte.media/sashakoshka/tomo/nasin"
2023-01-20 16:05:48 -07:00
import "git.tebibyte.media/sashakoshka/tomo/elements/testing"
2023-03-08 18:41:48 -07:00
import "git.tebibyte.media/sashakoshka/ezprof/ez"
2023-01-20 16:05:48 -07:00
func main () {
2023-05-02 20:19:29 -06:00
nasin.Run(Application { })
2023-01-20 16:05:48 -07:00
}
2023-05-02 20:19:29 -06:00
type Application struct { }
func (Application) Init () error {
window, err := nasin.NewWindow(tomo.Bounds(0, 0, 480, 360))
if err != nil { return err }
2023-01-20 16:05:48 -07:00
window.Adopt(testing.NewArtist())
2023-05-02 20:19:29 -06:00
window.OnClose(nasin.Stop)
2023-03-08 19:05:56 -07:00
window.Show()
2023-03-08 18:41:48 -07:00
ez.Prof()
2023-05-02 20:19:29 -06:00
return nil
2023-01-20 16:05:48 -07:00
}