Settings are stored.
Window location is passed to new renderer.
This commit is contained in:
parent
89c8a5225e
commit
498021456d
@ -135,6 +135,7 @@ func run() error {
|
|||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
defer settings.Store()
|
||||||
|
|
||||||
if settings.Window.Location == nil {
|
if settings.Window.Location == nil {
|
||||||
settings.Window.Location = ptPtr(sdl.WINDOWPOS_UNDEFINED, sdl.WINDOWPOS_UNDEFINED)
|
settings.Window.Location = ptPtr(sdl.WINDOWPOS_UNDEFINED, sdl.WINDOWPOS_UNDEFINED)
|
||||||
@ -147,6 +148,7 @@ func run() error {
|
|||||||
settings.Window.VSync = &vsync
|
settings.Window.VSync = &vsync
|
||||||
}
|
}
|
||||||
renderer, err := ui.NewRenderer("Botanim - TINS 2020", settings.Window.Size.X, settings.Window.Size.Y, ui.NewRendererOptions{
|
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,
|
Resizable: true,
|
||||||
VSync: *settings.Window.VSync,
|
VSync: *settings.Window.VSync,
|
||||||
})
|
})
|
||||||
|
Loading…
Reference in New Issue
Block a user