move sprite to window center
This commit is contained in:
parent
79f179df3d
commit
87bd244e62
2
main.go
2
main.go
@ -46,7 +46,7 @@ func run() {
|
|||||||
sprite := pixel.NewSprite(pic, pic.Bounds())
|
sprite := pixel.NewSprite(pic, pic.Bounds())
|
||||||
|
|
||||||
win.Clear(colornames.Skyblue)
|
win.Clear(colornames.Skyblue)
|
||||||
sprite.Draw(win, pixel.IM)
|
sprite.Draw(win, pixel.IM.Moved(win.Bounds().Center()))
|
||||||
|
|
||||||
for !win.Closed() {
|
for !win.Closed() {
|
||||||
win.Update()
|
win.Update()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user