From 498021456d4bbc6ee8347ba25d836895cd80fc56 Mon Sep 17 00:00:00 2001 From: Sander Schobers Date: Sun, 17 May 2020 21:06:42 +0200 Subject: [PATCH] Settings are stored. Window location is passed to new renderer. --- cmd/tins2020/tins2020.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/cmd/tins2020/tins2020.go b/cmd/tins2020/tins2020.go index 1973fdb..18f596e 100644 --- a/cmd/tins2020/tins2020.go +++ b/cmd/tins2020/tins2020.go @@ -135,6 +135,7 @@ func run() error { if err != nil { return err } + defer settings.Store() if settings.Window.Location == nil { settings.Window.Location = ptPtr(sdl.WINDOWPOS_UNDEFINED, sdl.WINDOWPOS_UNDEFINED) @@ -147,6 +148,7 @@ func run() error { settings.Window.VSync = &vsync } renderer, err := ui.NewRenderer("Botanim - TINS 2020", settings.Window.Size.X, settings.Window.Size.Y, ui.NewRendererOptions{ + Location: &geom.PointF32{X: float32(settings.Window.Location.X), Y: float32(settings.Window.Location.Y)}, Resizable: true, VSync: *settings.Window.VSync, })