Updating flower texts after closing a dialog to be sure.

This commit is contained in:
Sander Schobers 2020-05-11 15:23:07 +02:00
parent cc8f8da5df
commit 9f19e4bd92

View File

@ -87,7 +87,10 @@ func (c *GameControls) Init(ctx *Context) error {
c.game.SpeedChanged().RegisterItf(c.speedChanged) c.game.SpeedChanged().RegisterItf(c.speedChanged)
c.game.ToolChanged().RegisterItf(c.toolChanged) c.game.ToolChanged().RegisterItf(c.toolChanged)
c.dialogs.DialogOpened().Register(func() { c.game.Pause() }) c.dialogs.DialogOpened().Register(func() { c.game.Pause() })
c.dialogs.DialogClosed().Register(func() { c.game.Resume() }) c.dialogs.DialogClosed().Register(func() {
c.updateFlowerControls(ctx)
c.game.Resume()
})
c.flowers.Background = MustHexColor("#356dad") c.flowers.Background = MustHexColor("#356dad")
c.flowers.ButtonLength = 64 c.flowers.ButtonLength = 64