1
0
Fork 0

feat: implement persistant configuration

This commit is contained in:
Henrik Hautakoski 2025-10-28 06:35:14 +01:00
parent 30b194619f
commit 8a02249845
5 changed files with 82 additions and 0 deletions

View file

@ -5,6 +5,7 @@ import (
"tetris/engine/audio"
"tetris/engine/core"
"tetris/engine/render"
"tetris/game"
"tetris/game/state"
"tetris/game/ui"
"tetris/game/ui/layouts"
@ -24,6 +25,10 @@ func soundVolumeChanged(widget *widgets.Slider) {
audio.SetVolume(value)
audio.Play(assets.SFX_MENU_SOUND_VOLUME_SELECT)
// Store in config and save
game.Config.SoundVolume = byte(widget.Value)
game.Config.Save()
}
func NewOptionsMenu() *OptionsMenu {