fixed exit function with q, added evolution trace to options fixed inverse

This commit is contained in:
2024-06-03 18:38:18 +02:00
parent 03e1101248
commit 443b5a2bcf
5 changed files with 35 additions and 6 deletions

View File

@@ -95,7 +95,7 @@ func (scene *SceneOptions) Init() {
invert := NewCheckbox("Invert",
func(args *widget.CheckboxChangedEventArgs) {
scene.Config.Invert = true
scene.Config.ToggleInvert()
})
scene.SetInitialValue(invert, scene.Config.Invert)
@@ -105,6 +105,12 @@ func (scene *SceneOptions) Init() {
})
scene.SetInitialValue(gridlines, scene.Config.ShowGrid)
evolution := NewCheckbox("Show evolution traces",
func(args *widget.CheckboxChangedEventArgs) {
scene.Config.ToggleEvolution()
})
scene.SetInitialValue(evolution, scene.Config.ShowEvolution)
separator := NewSeparator(3)
cancel := NewMenuButton("Close",
@@ -116,6 +122,7 @@ func (scene *SceneOptions) Init() {
rowContainer.AddChild(debugging)
rowContainer.AddChild(invert)
rowContainer.AddChild(gridlines)
rowContainer.AddChild(evolution)
rowContainer.AddChild(separator)
rowContainer.AddChild(cancel)